[PATCH] power: supply: Add missing free in free_charger_irq

Jiasheng Jiang posted 1 patch 4 years, 3 months ago
drivers/power/supply/wm8350_power.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] power: supply: Add missing free in free_charger_irq
Posted by Jiasheng Jiang 4 years, 3 months ago
In free_charger_irq(), there is no free for 'WM8350_IRQ_CHG_FAST_RDY'.
Therefore, it should be better to add it in order to avoid the memory leak.

Fixes: 14431aa0c5a4 ("power_supply: Add support for WM8350 PMU")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
---
 drivers/power/supply/wm8350_power.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/power/supply/wm8350_power.c b/drivers/power/supply/wm8350_power.c
index e05cee457471..c7fe5d86ae2e 100644
--- a/drivers/power/supply/wm8350_power.c
+++ b/drivers/power/supply/wm8350_power.c
@@ -456,6 +456,7 @@ static void free_charger_irq(struct wm8350 *wm8350)
 	wm8350_free_irq(wm8350, WM8350_IRQ_CHG_TO, wm8350);
 	wm8350_free_irq(wm8350, WM8350_IRQ_CHG_END, wm8350);
 	wm8350_free_irq(wm8350, WM8350_IRQ_CHG_START, wm8350);
+	wm8350_free_irq(wm8350, WM8350_IRQ_CHG_FAST_RDY, wm8350);
 	wm8350_free_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_3P9, wm8350);
 	wm8350_free_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_3P1, wm8350);
 	wm8350_free_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_2P85, wm8350);
-- 
2.25.1
Re: [PATCH] power: supply: Add missing free in free_charger_irq
Posted by Charles Keepax 4 years, 3 months ago
On Thu, Mar 03, 2022 at 05:43:22PM +0800, Jiasheng Jiang wrote:
> In free_charger_irq(), there is no free for 'WM8350_IRQ_CHG_FAST_RDY'.
> Therefore, it should be better to add it in order to avoid the memory leak.
> 
> Fixes: 14431aa0c5a4 ("power_supply: Add support for WM8350 PMU")
> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles
Re: [PATCH] power: supply: Add missing free in free_charger_irq
Posted by Sebastian Reichel 4 years, 3 months ago
Hi,

On Thu, Mar 03, 2022 at 01:26:17PM +0000, Charles Keepax wrote:
> On Thu, Mar 03, 2022 at 05:43:22PM +0800, Jiasheng Jiang wrote:
> > In free_charger_irq(), there is no free for 'WM8350_IRQ_CHG_FAST_RDY'.
> > Therefore, it should be better to add it in order to avoid the memory leak.
> > 
> > Fixes: 14431aa0c5a4 ("power_supply: Add support for WM8350 PMU")
> > Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
> > ---
> 
> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks, queued.

-- Sebastian