[PATCH] asoc: mediatek: common: Remove check of return value of mtk_memif_set_addr() and mtk_memif_set_format()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The mtk_memif_set_addr() and mtk_memif_set_format() functions always returns 0, so it is
necessary to remove the check of its return value (which was
probably specified by analogy with the check of return values
for other functions) to make the code more readable

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: df799b9502ed ("ASoC: mediatek: common: refine hw_params and hw_prepare")
Signed-off-by: Alexandra Diupina <adiupina@xxxxxxxxxxxxx>
---
 sound/soc/mediatek/common/mtk-afe-fe-dai.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/sound/soc/mediatek/common/mtk-afe-fe-dai.c b/sound/soc/mediatek/common/mtk-afe-fe-dai.c
index 882cdf86c8bf..3c8a11c5958d 100644
--- a/sound/soc/mediatek/common/mtk-afe-fe-dai.c
+++ b/sound/soc/mediatek/common/mtk-afe-fe-dai.c
@@ -143,15 +143,10 @@ int mtk_afe_fe_hw_params(struct snd_pcm_substream *substream,
 		  substream->runtime->dma_bytes);
 
 	/* set addr */
-	ret = mtk_memif_set_addr(afe, id,
+	mtk_memif_set_addr(afe, id,
 				 substream->runtime->dma_area,
 				 substream->runtime->dma_addr,
 				 substream->runtime->dma_bytes);
-	if (ret) {
-		dev_err(afe->dev, "%s(), error, id %d, set addr, ret %d\n",
-			__func__, id, ret);
-		return ret;
-	}
 
 	/* set channel */
 	ret = mtk_memif_set_channel(afe, id, channels);
@@ -170,12 +165,7 @@ int mtk_afe_fe_hw_params(struct snd_pcm_substream *substream,
 	}
 
 	/* set format */
-	ret = mtk_memif_set_format(afe, id, format);
-	if (ret) {
-		dev_err(afe->dev, "%s(), error, id %d, set format %d, ret %d\n",
-			__func__, id, format, ret);
-		return ret;
-	}
+	mtk_memif_set_format(afe, id, format);
 
 	return 0;
 }
-- 
2.30.2




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux