]> git.baikalelectronics.ru Git - kernel.git/commit
thinkpad-acpi: don't leave ERR_PTR() pointers around
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sun, 20 Sep 2009 17:09:22 +0000 (14:09 -0300)
committerLen Brown <len.brown@intel.com>
Sun, 20 Sep 2009 17:43:29 +0000 (13:43 -0400)
commit18ce2adf81b7555b0a4b38a55ae4d9a251d7a155
tree2cd23fc6a2324023f728a8595c42d82d842e3cef
parentd422f1ab7d12069bf50298c44f91d36aef908fbd
thinkpad-acpi: don't leave ERR_PTR() pointers around

backlight_device_register returns ERR_PTR() in case of problems, and
the current code would leave that ERR_PTR in ibm_backlight_device.

The current code paths won't touch it in that situation, but that could
change.  Make sure to set ibm_backlight_device to NULL in the error
path.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/platform/x86/thinkpad_acpi.c