[PATCH 2/4] ASoC: mediatek: mt8188: return 0 from mt8188_afe_fe_startup() on success

Cezary Rojewski cezary.rojewski at intel.com
Tue Oct 6 03:39:54 PDT 2026


On 10/6/2026 12:16 PM, phucduc.bui at gmail.com wrote:

> --- a/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
> +++ b/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
> @@ -318,8 +318,11 @@ static int mt8188_afe_fe_startup(struct snd_pcm_substream *substream,
>  	ret = snd_pcm_hw_constraint_minmax(runtime,
>  					   SNDRV_PCM_HW_PARAM_PERIOD_SIZE, 1,
>  					   MT8188_MEMIF_DL7_MAX_PERIOD_SIZE);
> -	if (ret < 0)
> +	if (ret >= 0)
> +		ret = 0;
> +	else
>  		dev_dbg(afe->dev, "hw_constraint_minmax failed\n");


You can reduce the delta by leaving the original if-statement as-is and
following it up with:

	else
		ret = 0;

> +
>  out:
>  	return ret;
>  }




More information about the Linux-mediatek mailing list