thinkpad-acpi: don't leave ERR_PTR() pointers around
commit8c78e1f9acc83dd89cd99c0d8abf6363e42d2178
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sun, 20 Sep 2009 18:22:21 +0000 (20 15:22 -0300)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sun, 20 Sep 2009 18:22:21 +0000 (20 15:22 -0300)
tree48164e4e9cdecee027a9dcf843955f5247d03a42
parent2b62f6696b4e61d8424386ea6f56ab2bdf0ce161
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>
drivers/platform/x86/thinkpad_acpi.c