public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Haotian Zhang <vulab@iscas.ac.cn>
Cc: david.rhodes@cirrus.com, rf@opensource.cirrus.com,
	lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz,
	tiwai@suse.com, linux-sound@vger.kernel.org,
	patches@opensource.cirrus.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: cs4271: Fix regulator leak on probe failure
Date: Thu, 6 Nov 2025 11:03:30 +0000	[thread overview]
Message-ID: <aQyAgjn2+WOwOwLf@opensource.cirrus.com> (raw)
In-Reply-To: <20251105062246.1955-1-vulab@iscas.ac.cn>

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@iscas.ac.cn>
> ---

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

Thanks,
Charles

  parent reply	other threads:[~2025-11-06 11:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-05  6:22 [PATCH] ASoC: cs4271: Fix regulator leak on probe failure Haotian Zhang
2025-11-05  8:43 ` Markus Elfring
2025-11-05 11:54   ` Mark Brown
2025-11-06 11:03 ` Charles Keepax [this message]
2025-11-06 23:54 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aQyAgjn2+WOwOwLf@opensource.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=broonie@kernel.org \
    --cc=david.rhodes@cirrus.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=perex@perex.cz \
    --cc=rf@opensource.cirrus.com \
    --cc=tiwai@suse.com \
    --cc=vulab@iscas.ac.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox