greybus: power_supply: free supplies at release
authorRui Miguel Silva <rui.silva@linaro.org>
Fri, 8 Jan 2016 13:53:44 +0000 (13:53 +0000)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 12 Jan 2016 03:18:14 +0000 (19:18 -0800)
commit23f25ba6edd4121eb70baf3df12f5592bee8a1e9
tree7f7b3418d39ab3b11af4b7d523817126f5281145
parentff85f723ca362986dc984217433cbdd133fc03d6
greybus: power_supply: free supplies at release

After freeing each individual power_supply, free the top controller, if
not it will leak memory at each module insert/remove.

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