[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <af3de02edc2dd1f2cf959a98863e02bee8398373.1426581620.git.jslaby@suse.cz>
Date: Tue, 17 Mar 2015 09:39:55 +0100
From: Jiri Slaby <jslaby@...e.cz>
To: stable@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Krzysztof Kozlowski <k.kozlowski@...sung.com>,
Sebastian Reichel <sre@...nel.org>, Jiri Slaby <jslaby@...e.cz>
Subject: [PATCH 3.12 017/175] power_supply: 88pm860x: Fix leaked power supply on probe fail
From: Krzysztof Kozlowski <k.kozlowski@...sung.com>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 24727b45b484e8937dcde53fa8d1aa70ac30ec0c upstream.
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@...sung.com>
Fixes: a830d28b48bf ("power_supply: Enable battery-charger for 88pm860x")
Signed-off-by: Sebastian Reichel <sre@...nel.org>
Signed-off-by: Jiri Slaby <jslaby@...e.cz>
---
drivers/power/88pm860x_charger.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/power/88pm860x_charger.c b/drivers/power/88pm860x_charger.c
index de029bbc1cc1..5ccca8743ce6 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:
--
2.3.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists