aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
authorRichard Fitzgerald <rf@opensource.cirrus.com>2026-05-28 15:46:32 +0100
committerMark Brown <broonie@kernel.org>2026-05-28 16:16:34 +0100
commit3b28b14b794cb95427028d55122eeff0787315ca (patch)
tree4dcae678f628b561334df85c63c8da6349618237 /sound
parentec4489c43efe434a132f27ff9298345de1cfacd8 (diff)
downloadlinux-next-history-3b28b14b794cb95427028d55122eeff0787315ca.tar.gz
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>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/cs-amp-lib.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sound/soc/codecs/cs-amp-lib.c b/sound/soc/codecs/cs-amp-lib.c
index fb5b950e584c8..371e99205b58e 100644
--- a/sound/soc/codecs/cs-amp-lib.c
+++ b/sound/soc/codecs/cs-amp-lib.c
@@ -748,10 +748,7 @@ static const char *cs_amp_devm_get_dell_ssidex(struct device *dev,
char *ssidex_buf __free(kfree) = cs_amp_alloc_get_efi_variable(DELL_SSIDEXV2_EFI_NAME,
&DELL_SSIDEXV2_EFI_GUID,
NULL);
- ret = PTR_ERR_OR_ZERO(ssidex_buf);
- if (ret == -ENOENT)
- return ERR_PTR(-ENOENT);
- else if (ret < 0)
+ if (IS_ERR(ssidex_buf))
return ssidex_buf;
/*