From e16cbba1266fd08cae9abc8ff434d51553821abd Mon Sep 17 00:00:00 2001 From: Jiasheng Jiang Date: Sat, 24 Dec 2022 09:02:33 +0000 Subject: [PATCH] power: supply: wm8350-power: Add missing free in free_charger_irq stable inclusion from stable-v4.19.269 commit 60dd1082322966f192f42fe2a6605dfa08eef41f category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I6694F CVE: CVE-2022-3111 -------------------------------- [ Upstream commit 6dee930f6f6776d1e5a7edf542c6863b47d9f078 ] 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 Acked-by: Charles Keepax Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin Signed-off-by: Chen jun Reviewed-by: chenweilong Reviewed-by: Wang Weiyang Signed-off-by: Yongqiang Liu --- 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 15c0ca15e2aa..034ddfe3b62c 100644 --- a/drivers/power/supply/wm8350_power.c +++ b/drivers/power/supply/wm8350_power.c @@ -459,6 +459,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); -- GitLab