thinkpad-acpi: don't leave ERR_PTR() pointers around
commitb3ed11d240c3ed7b92bc9e9bf9de0714f66a3eee
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Fri, 4 Dec 2009 11:13:12 +0000 (4 09:13 -0200)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Fri, 4 Dec 2009 11:13:12 +0000 (4 09:13 -0200)
tree475cd0bf26fa5eb5749dacbc8948c4b851255421
parent5776fe24e640d8e385bac21f91835768084cc24c
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