Skip to contentSkip to conversation

ASoC: qcom: qdsp6: Set error code in q6usb_hw_params()

PATCH In review Dan Carpenter 3 participants 3 messages Apr 15, 2025

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: qcom: qdsp6: Set error code in q6usb_hw_params()

Propagate the error code if q6afe_port_get_from_id() fails. Don't return success.

Fixes 72b0b8b29980 ("ASoC: qcom: qdsp6: Add USB backend ASoC driver for Q6")
---
 sound/soc/qcom/qdsp6/q6usb.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
sound/soc/qcom/qdsp6/q6usb.c +3 -1
index 274c251e84dd..adba0446f301 100644
@@ -74,8 +74,10 @@ static int q6usb_hw_params(struct snd_pcm_substream *substream,
 		goto out;
 
 	q6usb_afe = q6afe_port_get_from_id(cpu_dai->dev, USB_RX);
-	if (IS_ERR(q6usb_afe))
+	if (IS_ERR(q6usb_afe)) {
+		ret = PTR_ERR(q6usb_afe);
 		goto out;
+	}
 
 	/* Notify audio DSP about the devices being offloaded */
 	ret = afe_port_send_usb_dev_param(q6usb_afe, sdev->card_idx,
Signature · 1 line
2.47.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Dan Carpenter

Propagate the error code if q6afe_port_get_from_id() fails. Don't return success.

Fixes 72b0b8b29980 ("ASoC: qcom: qdsp6: Add USB backend ASoC driver for Q6")
---
 sound/soc/qcom/qdsp6/q6usb.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Signature · 2 lines
With best wishes
Dmitry