提交 24727b45 编写于 作者: K Krzysztof Kozlowski 提交者: Sebastian Reichel

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: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
Fixes: a830d28b ("power_supply: Enable battery-charger for 88pm860x")
Cc: <stable@vger.kernel.org>
Signed-off-by: NSebastian Reichel <sre@kernel.org>
上级 7bae8f04
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册