Skip to content
Commit 59f91ff1 authored by Henrique de Moraes Holschuh's avatar Henrique de Moraes Holschuh Committed by Len Brown
Browse files

ACPI: thinkpad-acpi: fix oops when a module parameter has no value



set_ibm_param() could OOPS with a NULL pointer derreference if one did not give
any values for a module parameter it handles.  This would, of course, cause all
sort of trouble for future modprobing and require a reboot to clean up
properly.

Fix it by returning -EINVAL if no values are given for the parameter, and also
avoid any nastyness from BUG_ON while at it.

How to reproduce: modprobe thinkpad-acpi brightness

Signed-off-by: default avatarHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Tested-by: default avatarMike Kershaw <dragorn@kismetwireless.net>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 4273af8d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment