greybus: power_supply: do not release failed supply alloc
authorRui Miguel Silva <rui.silva@linaro.org>
Fri, 8 Jan 2016 13:53:42 +0000 (13:53 +0000)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 12 Jan 2016 03:18:14 +0000 (19:18 -0800)
commit7ccac20d59ca45a2efea93a24a99d57022ff8911
tree5112bcbb75c187e5b5d50082be649173160e5378
parente0d91ff127cf68e6369cfccd51af18b07bf462e3
greybus: power_supply: do not release failed supply alloc

If allocation of memory for each supply fail, we should get out of
release any individual supply.

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