diff mbox series

[1/4] ASoC: SOF: ipc4: Convert status code 2 and 15 to -EOPNOTSUPP

Message ID 20230915114018.1701-2-peter.ujfalusi@linux.intel.com
State Accepted
Commit c2d8f17ed0c70816737cbf8f530d2178ee6affbb
Headers show
Series ASoC: SOF: ipc4/Intel: Implement split fw library loading | expand

Commit Message

Peter Ujfalusi Sept. 15, 2023, 11:40 a.m. UTC
The status code 2 and 15 can be translated to -EOPNOTSUPP, so convert them
to a meaningful error number.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Chao Song <chao.song@linux.intel.com>
---
 sound/soc/sof/ipc4.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/sound/soc/sof/ipc4.c b/sound/soc/sof/ipc4.c
index ab6eddd91bb7..24e9c29f3579 100644
--- a/sound/soc/sof/ipc4.c
+++ b/sound/soc/sof/ipc4.c
@@ -99,6 +99,10 @@  static int sof_ipc4_check_reply_status(struct snd_sof_dev *sdev, u32 status)
 
 to_errno:
 	switch (status) {
+	case 2:
+	case 15:
+		ret = -EOPNOTSUPP;
+		break;
 	case 8:
 	case 11:
 	case 105 ... 109: