From: Dan Carpenter Date: Thu, 8 Jun 2023 08:47:24 +0000 (+0200) Subject: ASoC: mediatek: mt8188-mt6359: clean up a return in codec_init X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1148b42257e2bf30093708398db2c4570ae9fe97;p=linux.git ASoC: mediatek: mt8188-mt6359: clean up a return in codec_init This code triggers a Smatch static checker warning and does sort of look like an error path. sound/soc/mediatek/mt8188/mt8188-mt6359.c:597 mt8188_max98390_codec_init() warn: missing error code? 'ret' However, returning 0 is intentional. Make that explicit. Signed-off-by: Dan Carpenter Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Alexandre Mergnat Link: https://lore.kernel.org/r/20230608084727.74403-3-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/mediatek/mt8188/mt8188-mt6359.c b/sound/soc/mediatek/mt8188/mt8188-mt6359.c index 643a7a12a96bd..b2735496d140d 100644 --- a/sound/soc/mediatek/mt8188/mt8188-mt6359.c +++ b/sound/soc/mediatek/mt8188/mt8188-mt6359.c @@ -594,7 +594,7 @@ static int mt8188_max98390_codec_init(struct snd_soc_pcm_runtime *rtd) } if (rtd->dai_link->num_codecs <= 2) - return ret; + return 0; /* add widgets/controls/dapm for rear speakers */ ret = snd_soc_dapm_new_controls(&card->dapm, mt8188_rear_spk_widgets,