1
0
Files
linux/drivers
David Herrmann dde58cfcc3 HID: wacom: Fix error path of power-supply initialization
power_supply_unregister() must not be called if power_supply_register() failed.
The wdata->psy.dev pointer may point to invalid memory after a failed
power_supply_register() and hence wacom_remove() will fail while calling
power_supply_unregister().

This changes the wacom_probe function to fail if it cannot register the
power_supply devices. If we would want to keep the previous behaviour we had to
keep some flag about the power_supply state and check it on wacom_remove, but
this seems inappropriate here. Hence, we simply fail, too, if
power_supply_register fails.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-07 13:32:34 +02:00
..
2011-08-05 22:16:42 -04:00
2011-07-28 01:30:07 -07:00
2011-08-11 10:14:18 -07:00
2011-08-13 14:50:32 -04:00
2011-08-03 16:44:21 +02:00
2011-08-16 07:22:16 -07:00
2011-08-07 15:51:45 -07:00
2011-08-16 07:23:34 -07:00