mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
mfd: arizona: Fix regulator resource leak on wm5102_clear_write_sequencer() failure
[ Upstream commit4feb753ba6] The wm5102_clear_write_sequencer() helper may return an error and just return, bypassing the cleanup sequence and causing regulators to remain enabled, leading to a resource leak. Change the direct return to jump to the err_reset label to properly free the resources. Fixes:1c1c6bba57("mfd: wm5102: Ensure we always boot the device fully") Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20251214145804.2037-1-vulab@iscas.ac.cn Signed-off-by: Lee Jones <lee@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Sasha Levin
parent
9c858ef369
commit
3ea0169173
@@ -1100,7 +1100,7 @@ int arizona_dev_init(struct arizona *arizona)
|
||||
} else if (val & 0x01) {
|
||||
ret = wm5102_clear_write_sequencer(arizona);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto err_reset;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user