mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 20:51:44 +00:00
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: a830d28b48
("power_supply: Enable battery-charger for 88pm860x")
Cc: <stable@vger.kernel.org>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
This commit is contained in:
parent
7bae8f0481
commit
24727b45b4
@ -711,6 +711,7 @@ static int pm860x_charger_probe(struct platform_device *pdev)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
out_irq:
|
out_irq:
|
||||||
|
power_supply_unregister(&info->usb);
|
||||||
while (--i >= 0)
|
while (--i >= 0)
|
||||||
free_irq(info->irq[i], info);
|
free_irq(info->irq[i], info);
|
||||||
out:
|
out:
|
||||||
|
Loading…
Reference in New Issue
Block a user