diff options
| author | Haotian Zhang <vulab@iscas.ac.cn> | 2025-12-14 22:58:03 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-02-26 15:01:25 -0800 |
| commit | 2049820d1e635e467d795237fd40287213d92349 (patch) | |
| tree | 8a4e8c9abe2c826c79329374ce6f1904ffc72dfd /drivers | |
| parent | 46f65197bd0ecbd0b8fbfa9cd5c3d099ade54f80 (diff) | |
| download | linux-2049820d1e635e467d795237fd40287213d92349.tar.gz linux-2049820d1e635e467d795237fd40287213d92349.tar.bz2 linux-2049820d1e635e467d795237fd40287213d92349.zip | |
mfd: arizona: Fix regulator resource leak on wm5102_clear_write_sequencer() failure
[ Upstream commit 4feb753ba6e5e5bbaba868b841a2db41c21e56fa ]
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: 1c1c6bba57f5 ("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>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/mfd/arizona-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c index 85ff8717d850..91975536d14d 100644 --- a/drivers/mfd/arizona-core.c +++ b/drivers/mfd/arizona-core.c @@ -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: |
