ASoC: simple-card: Fix clang build

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: 7f20b9b05b ("ASoC: simple-card: merge extra method into simple_parse_of()")
Link: https://patch.msgid.link/20260713-asoc-fix-simple-card-build-v1-1-671ad44ad1a0@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Mark Brown 2026-07-13 17:04:04 +01:00
parent cd02656216
commit a9a2c8c44b
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -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);