]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ASoC: wm_adsp: Use consistent error checks in wm_adsp_request_firmware_files()
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Tue, 10 Mar 2026 14:18:13 +0000 (14:18 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 10 Mar 2026 14:52:53 +0000 (14:52 +0000)
commitf8f0c68c75214e326c0d4cbcab8ecab882201f48
tree15381b7bfb1f1b0cfa7b111a1f1c703d3fa9b292
parent2c7c27025374abbdeda201ad103ddf27e8079aec
ASoC: wm_adsp: Use consistent error checks in wm_adsp_request_firmware_files()

Use a consistent pattern of error checking in
wm_adsp_request_firmware_files().

- The integer return value of wm_adsp_request_firmware_file() reports
  unrecoverable errors, for example -ENOMEM.

- A NULL struct firmware pointer is a valid result. This not an error,
  not all DSPs require both files, some may not require any files.

Previously wm_adsp_request_firmware_files() was using a mix of checking
the return value and checking the struct firmware pointer to determine
whether a file was found. It wasn't checking for unrecoverable errors.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260310141817.1871794-7-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm_adsp.c