Skip to content

Commit

Permalink
power_supply: 88pm860x: Fix leaked power supply on probe fail
Browse files Browse the repository at this point in the history
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: a830d28 ("power_supply: Enable battery-charger for 88pm860x")
Cc: <stable@vger.kernel.org>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
  • Loading branch information
Krzysztof Kozlowski authored and Sebastian Reichel committed Jan 28, 2015
1 parent 7bae8f0 commit 24727b4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/power/88pm860x_charger.c
Original file line number Diff line number Diff line change
@@ -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:

0 comments on commit 24727b4

Please sign in to comment.