summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorTang Bin <tangbin@cmss.chinamobile.com>2024-10-25 11:09:38 +0200
committerMark Brown <broonie@kernel.org>2024-11-08 14:33:06 +0100
commitf3c889745cd3500bcbce6f6c8cb7e343f067ac18 (patch)
treea491fac2cdf456932d594a9b002df87f42d93ebb /sound/soc
parentAdd a driver for the Iron Device SMA1307 Amp (diff)
downloadlinux-f3c889745cd3500bcbce6f6c8cb7e343f067ac18.tar.xz
linux-f3c889745cd3500bcbce6f6c8cb7e343f067ac18.zip
ASoC: mediatek: mt8183: Remove unnecessary variable assignments
In the function mt8183_dai_i2s_register, the variable 'ret' is redundant, thus remove it. Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com> Link: https://patch.msgid.link/20241025090938.3480-1-tangbin@cmss.chinamobile.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/mediatek/mt8183/mt8183-dai-i2s.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sound/soc/mediatek/mt8183/mt8183-dai-i2s.c b/sound/soc/mediatek/mt8183/mt8183-dai-i2s.c
index 65e46ebe7be6..5cf5592336d3 100644
--- a/sound/soc/mediatek/mt8183/mt8183-dai-i2s.c
+++ b/sound/soc/mediatek/mt8183/mt8183-dai-i2s.c
@@ -1036,7 +1036,6 @@ static int mt8183_dai_i2s_set_priv(struct mtk_base_afe *afe)
int mt8183_dai_i2s_register(struct mtk_base_afe *afe)
{
struct mtk_base_afe_dai *dai;
- int ret;
dai = devm_kzalloc(afe->dev, sizeof(*dai), GFP_KERNEL);
if (!dai)
@@ -1055,9 +1054,5 @@ int mt8183_dai_i2s_register(struct mtk_base_afe *afe)
dai->num_dapm_routes = ARRAY_SIZE(mtk_dai_i2s_routes);
/* set all dai i2s private data */
- ret = mt8183_dai_i2s_set_priv(afe);
- if (ret)
- return ret;
-
- return 0;
+ return mt8183_dai_i2s_set_priv(afe);
}