Skip to contentSkip to conversation

ASoC: imx-pcm-rpmsg: Directly return 0 instead of using local ret variable

PATCH New Haowen Bai 1 participant 1 message Mar 1, 2022

Subsystems (4)
lore
Share & tools
lore

Haowen Bai

author
#0 lore raw

PATCH 1/1 ASoC: imx-pcm-rpmsg: Directly return 0 instead of using local ret variable

fixes coccinelle warning:
sound/soc/fsl/imx-pcm-rpmsg.c:285:5-8: Unneeded variable: "ret". Return "0" on line 308

---
 sound/soc/fsl/imx-pcm-rpmsg.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/fsl/imx-pcm-rpmsg.c +1 -2
index 3504904..afea28a 100644
@@ -282,7 +282,6 @@ static int imx_rpmsg_pcm_close(struct snd_soc_component *component,
 	struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
 	struct rpmsg_info *info = dev_get_drvdata(component->dev);
 	struct rpmsg_msg *msg;
-	int ret = 0;
 
 	/* Flush work in workqueue to make TX_CLOSE is the last message */
 	flush_workqueue(info->rpmsg_wq);
@@ -305,7 +304,7 @@ static int imx_rpmsg_pcm_close(struct snd_soc_component *component,
 		dev_warn(rtd->dev, "Msg is dropped!, number is %d\n",
 			 info->msg_drop_count[substream->stream]);
 
-	return ret;
+	return 0;
 }
 
 static int imx_rpmsg_pcm_prepare(struct snd_soc_component *component,
Signature · 1 line
2.7.4