Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [PATCH] ASoC: simple-card: Fix clang build
@ 2026-07-13 16:04 Mark Brown
  2026-07-13 16:43 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2026-07-13 16:04 UTC (permalink / raw)
  To: Kuninori Morimoto, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	Nathan Chancellor, Nick Desaulniers, Bill Wendling, Justin Stitt
  Cc: linux-sound, linux-kernel, llvm, Mark Brown

Jumping over the allocation of the link_info for a missing dev breaks
the build:

/tmp/next/build/sound/soc/generic/simple-card.c:676:3: error: cannot jump from this goto statement to its label
  676 |                 goto end;
      |                 ^
/tmp/next/build/sound/soc/generic/simple-card.c:679:20: note: jump bypasses initialization of variable with __attribute__((cleanup))
  679 |         struct link_info *li __free(kfree) = kzalloc_obj(*li);
      |                           ^

Fixes: 7f20b9b05b3a ("ASoC: simple-card: merge extra method into simple_parse_of()")
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/generic/simple-card.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index abfbc9fd7c6d..6e98e973e525 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -673,7 +673,7 @@ static int simple_parse_of(struct simple_util_priv *priv)
 	int ret = -EINVAL;
 
 	if (!dev)
-		goto end;
+		return simple_ret(priv, ret);
 
 	ret = -ENOMEM;
 	struct link_info *li __free(kfree) = kzalloc_obj(*li);

---
base-commit: a5ee3180a2a7bbbd84af70ef98283b3f3e6a821e
change-id: 20260713-asoc-fix-simple-card-build-645fe39a65da

Best regards,
--  
Mark Brown <broonie@kernel.org>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: simple-card: Fix clang build
  2026-07-13 16:04 [PATCH] ASoC: simple-card: Fix clang build Mark Brown
@ 2026-07-13 16:43 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-07-13 16:43 UTC (permalink / raw)
  To: Kuninori Morimoto, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	Nathan Chancellor, Nick Desaulniers, Bill Wendling, Justin Stitt,
	Mark Brown
  Cc: linux-sound, linux-kernel, llvm

On Mon, 13 Jul 2026 17:04:04 +0100, Mark Brown wrote:
> ASoC: simple-card: Fix clang build

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.3

Thanks!

[1/1] ASoC: simple-card: Fix clang build
      https://git.kernel.org/broonie/sound/c/a9a2c8c44b30

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-13 17:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-13 16:04 [PATCH] ASoC: simple-card: Fix clang build Mark Brown
2026-07-13 16:43 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox