thinkpad-acpi: don't leave ERR_PTR() pointers around
commitded0f940ef59f2074615a862b2fd7e50bb16c9c6
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sun, 20 Sep 2009 18:24:56 +0000 (20 15:24 -0300)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sun, 20 Sep 2009 18:24:56 +0000 (20 15:24 -0300)
treeb4164bc8712cc992f36acaa3ebab589237398ef2
parent830c5674009526882b016ec7b2a094cda0713c2f
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