]> git.hungrycats.org Git - linux/commit
ASoC: cs-amp-lib: Simplify overcomplicated error return
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Thu, 28 May 2026 14:46:32 +0000 (15:46 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 28 May 2026 15:16:34 +0000 (16:16 +0100)
commit3b28b14b794cb95427028d55122eeff0787315ca
tree4dcae678f628b561334df85c63c8da6349618237
parentec4489c43efe434a132f27ff9298345de1cfacd8
ASoC: cs-amp-lib: Simplify overcomplicated error return

In cs_amp_devm_get_dell_ssidex() remove an unnecessary special case check
on -ENOENT that just returned -ENOENT. The other branch of the if()
statement returned the error, which would of course return -ENOENT if the
error was -ENOENT and so do exactly the same as the first branch.

The whole if statement is identical to just returning the original pointer
if it is an error value.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260528144632.130197-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs-amp-lib.c