All of lore.kernel.org
 help / color / mirror / Atom feed
From: phucduc.bui@gmail.com
To: Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	Sen Wang <sen@ti.com>, Jarkko Nikula <jarkko.nikula@bitmer.com>,
	bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH 2/2] ASoC: ti: j721e-evm: Avoid mixing goto with guard()
Date: Wed,  1 Jul 2026 11:13:10 +0700	[thread overview]
Message-ID: <20260701041310.230725-3-phucduc.bui@gmail.com> (raw)
In-Reply-To: <20260701041310.230725-1-phucduc.bui@gmail.com>

From: bui duc phuc <phucduc.bui@gmail.com>

The previous guard(mutex) conversion mixed cleanup helpers with
goto-based error handling, which is discouraged by the cleanup.h
guidelines.
Restore mutex_lock()/mutex_unlock() instead.

Fixes: 6f4cf77320ae ("ASoC: ti: j721e-evm: Use guard() for mutex locks")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
 sound/soc/ti/j721e-evm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/soc/ti/j721e-evm.c b/sound/soc/ti/j721e-evm.c
index c214ae0d7b95..312298e0b004 100644
--- a/sound/soc/ti/j721e-evm.c
+++ b/sound/soc/ti/j721e-evm.c
@@ -4,6 +4,7 @@
  *  Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
  */
 
+#include <linux/cleanup.h>
 #include <linux/clk.h>
 #include <linux/module.h>
 #include <linux/of.h>
@@ -263,7 +264,7 @@ static int j721e_audio_startup(struct snd_pcm_substream *substream)
 	int ret = 0;
 	int i;
 
-	guard(mutex)(&priv->mutex);
+	mutex_lock(&priv->mutex);
 
 	domain->active++;
 
@@ -303,6 +304,7 @@ static int j721e_audio_startup(struct snd_pcm_substream *substream)
 out:
 	if (ret)
 		domain->active--;
+	mutex_unlock(&priv->mutex);
 
 	return ret;
 }
-- 
2.43.0


  parent reply	other threads:[~2026-07-01  4:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01  4:13 [PATCH 0/2] ASoC: Fix mixed goto and guard() usage phucduc.bui
2026-07-01  4:13 ` [PATCH 1/2] ASoC: samsung: i2s: Avoid mixing goto with guard() phucduc.bui
2026-07-01  4:13 ` phucduc.bui [this message]
2026-07-01 15:42 ` [PATCH 0/2] ASoC: Fix mixed goto and guard() usage 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=20260701041310.230725-3-phucduc.bui@gmail.com \
    --to=phucduc.bui@gmail.com \
    --cc=broonie@kernel.org \
    --cc=jarkko.nikula@bitmer.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=s.nawrocki@samsung.com \
    --cc=sen@ti.com \
    --cc=tiwai@suse.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.