greybus: power_supply: fix error path at supplies setup
authorRui Miguel Silva <rui.silva@linaro.org>
Fri, 8 Jan 2016 13:53:45 +0000 (13:53 +0000)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 12 Jan 2016 03:18:14 +0000 (19:18 -0800)
commitd9eafd58e3e365d71cd7d477a1c5675db1931027
tree68c350605d674c7ada0b7e87c917037a4592b8ed
parent23f25ba6edd4121eb70baf3df12f5592bee8a1e9
greybus: power_supply: fix error path at supplies setup

If something goes wrong at setup time for the supplies, we need to
release all the resources allocated already.

Call the supplies release function which will handle the correct
teardown of the supplies.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Reported-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/power_supply.c