[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aQyAgjn2+WOwOwLf@opensource.cirrus.com>
Date: Thu, 6 Nov 2025 11:03:30 +0000
From: Charles Keepax <ckeepax@...nsource.cirrus.com>
To: Haotian Zhang <vulab@...as.ac.cn>
Cc: david.rhodes@...rus.com, rf@...nsource.cirrus.com, lgirdwood@...il.com,
broonie@...nel.org, perex@...ex.cz, tiwai@...e.com,
linux-sound@...r.kernel.org, patches@...nsource.cirrus.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ASoC: cs4271: Fix regulator leak on probe failure
On Wed, Nov 05, 2025 at 02:22:46PM +0800, Haotian Zhang wrote:
> The probe function enables regulators at the beginning
> but fails to disable them in its error handling path.
> If any operation after enabling the regulators fails,
> the probe will exit with an error, leaving the regulators
> permanently enabled, which could lead to a resource leak.
>
> Add a proper error handling path to call regulator_bulk_disable()
> before returning an error.
>
> Fixes: 9a397f473657 ("ASoC: cs4271: add regulator consumer support")
> Signed-off-by: Haotian Zhang <vulab@...as.ac.cn>
> ---
Reviewed-by: Charles Keepax <ckeepax@...nsource.cirrus.com>
Thanks,
Charles
Powered by blists - more mailing lists