thinkpad-acpi: don't leave ERR_PTR() pointers around
commit7091e42081d11ca545df7271163dcdae3dd85d23
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Tue, 10 Nov 2009 23:12:43 +0000 (10 21:12 -0200)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Tue, 10 Nov 2009 23:12:43 +0000 (10 21:12 -0200)
tree9ef5bce1421fde09913ae5f3507dc55e03c7a5b8
parent976745bd26f7aa51a798a66bd5f873139505e48c
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