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>
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;
/*