[PATCH 1/2] ASoC: mediatek: mt8188: Remove unnecessary variable assignments

Matthias Brugger matthias.bgg at gmail.com
Thu Oct 10 04:00:14 PDT 2024



On 10/10/24 09:35, Tang Bin wrote:
> In the function mtk_dai_hdmitx_dptx_hw_params, the variable
> 'ret' is redundant, thus remove it.
> 
> Signed-off-by: Tang Bin <tangbin at cmss.chinamobile.com>

Reviewed-by: Matthias Brugger <matthias.bgg at gmail.com>

> ---
>   sound/soc/mediatek/mt8188/mt8188-dai-etdm.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/sound/soc/mediatek/mt8188/mt8188-dai-etdm.c b/sound/soc/mediatek/mt8188/mt8188-dai-etdm.c
> index 2a48f5fd6..69a091dad 100644
> --- a/sound/soc/mediatek/mt8188/mt8188-dai-etdm.c
> +++ b/sound/soc/mediatek/mt8188/mt8188-dai-etdm.c
> @@ -2422,7 +2422,6 @@ static int mtk_dai_hdmitx_dptx_hw_params(struct snd_pcm_substream *substream,
>   	unsigned int channels = params_channels(params);
>   	snd_pcm_format_t format = params_format(params);
>   	int width = snd_pcm_format_physical_width(format);
> -	int ret;
>   
>   	if (!is_valid_etdm_dai(dai->id))
>   		return -EINVAL;
> @@ -2450,9 +2449,7 @@ static int mtk_dai_hdmitx_dptx_hw_params(struct snd_pcm_substream *substream,
>   		etdm_data->data_mode = MTK_DAI_ETDM_DATA_MULTI_PIN;
>   	}
>   
> -	ret = mtk_dai_etdm_configure(afe, rate, channels, width, dai->id);
> -
> -	return ret;
> +	return mtk_dai_etdm_configure(afe, rate, channels, width, dai->id);
>   }
>   
>   static int mtk_dai_hdmitx_dptx_set_sysclk(struct snd_soc_dai *dai,




More information about the Linux-mediatek mailing list