thinkpad-acpi: don't leave ERR_PTR() pointers around
commit5fc744abe6451c16abaec0dee66c0557ded657d8
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Fri, 13 May 2011 12:22:11 +0000 (13 09:22 -0300)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Fri, 13 May 2011 12:22:11 +0000 (13 09:22 -0300)
treeaf751b1cb750c082c2eca1181ab57347c5f2d7bf
parent5585a68fd344071dd8c6b30cee1deac7e790113c
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