[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230825153650.20923-1-adiupina@astralinux.ru>
Date: Fri, 25 Aug 2023 18:36:50 +0300
From: Alexandra Diupina <adiupina@...ralinux.ru>
To: Liam Girdwood <lgirdwood@...il.com>
Cc: Alexandra Diupina <adiupina@...ralinux.ru>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Matthias Brugger <matthias.bgg@...il.com>,
Eason Yen <eason.yen@...iatek.com>,
alsa-devel@...a-project.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
lvc-project@...uxtesting.org
Subject: [PATCH] asoc: mediatek: common: Remove check of return value of mtk_memif_set_addr() and mtk_memif_set_format()
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@...ralinux.ru>
---
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
Powered by blists - more mailing lists