aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/adb-iop.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2011-09-05 12:45:28 -0400
committerJiri Kosina <jkosina@suse.cz>2011-09-07 07:32:34 -0400
commitdde58cfcc3b6dd2f160ffd355f76ae526155a4df (patch)
tree519419a6ef60a0a0f3b17a0ec3c7c12ce268843d /drivers/macintosh/adb-iop.c
parent6d1db0777981e1626ae71243984ac300b61789ff (diff)
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>
Diffstat (limited to 'drivers/macintosh/adb-iop.c')
0 files changed, 0 insertions, 0 deletions