summaryrefslogtreecommitdiffstats
path: root/drivers/power/88pm860x_charger.c
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>2015-01-27 16:51:54 +0100
committerSebastian Reichel <sre@kernel.org>2015-01-28 15:08:10 +0100
commit24727b45b484e8937dcde53fa8d1aa70ac30ec0c (patch)
tree668007fc24195e10ec6dc01cb3bfe3fc40662815 /drivers/power/88pm860x_charger.c
parent7bae8f04818cb388ca8652a55daa4132b469295e (diff)
downloadtalos-obmc-linux-24727b45b484e8937dcde53fa8d1aa70ac30ec0c.tar.gz
talos-obmc-linux-24727b45b484e8937dcde53fa8d1aa70ac30ec0c.zip
power_supply: 88pm860x: Fix leaked power supply on probe fail
Driver forgot to unregister power supply if request_threaded_irq() failed in probe(). In such case the memory associated with power supply leaked. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Fixes: a830d28b48bf ("power_supply: Enable battery-charger for 88pm860x") Cc: <stable@vger.kernel.org> Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power/88pm860x_charger.c')
-rw-r--r--drivers/power/88pm860x_charger.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/power/88pm860x_charger.c b/drivers/power/88pm860x_charger.c
index 650930e4fa79..734ec4afa14d 100644
--- a/drivers/power/88pm860x_charger.c
+++ b/drivers/power/88pm860x_charger.c
@@ -711,6 +711,7 @@ static int pm860x_charger_probe(struct platform_device *pdev)
return 0;
out_irq:
+ power_supply_unregister(&info->usb);
while (--i >= 0)
free_irq(info->irq[i], info);
out:
OpenPOWER on IntegriCloud