[PATCH 1/3] ASoC: mxs-saif: Use dev_err_probe() for error handling

Frank Li Frank.li at oss.nxp.com
Wed Aug 12 07:17:32 PDT 2026


On Wed, Aug 12, 2026 at 05:14:16PM +0700, phucduc.bui at gmail.com wrote:
> From: bui duc phuc <phucduc.bui at gmail.com>
>
> Replace dev_err() with dev_err_probe() to prevent log spam when probe
> returns -EPROBE_DEFER.
>
> Signed-off-by: bui duc phuc <phucduc.bui at gmail.com>
> ---

Reviewed-by: Frank Li <Frank.Li at nxp.com>

>  sound/soc/mxs/mxs-saif.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
> index a01a680ad4d7..b877c978a04c 100644
> --- a/sound/soc/mxs/mxs-saif.c
> +++ b/sound/soc/mxs/mxs-saif.c
> @@ -826,12 +826,9 @@ static int mxs_saif_probe(struct platform_device *pdev)
>  	mxs_saif[saif->id] = saif;
>
>  	saif->clk = devm_clk_get(&pdev->dev, NULL);
> -	if (IS_ERR(saif->clk)) {
> -		ret = PTR_ERR(saif->clk);
> -		dev_err(&pdev->dev, "Cannot get the clock: %d\n",
> -			ret);
> -		return ret;
> -	}
> +	if (IS_ERR(saif->clk))
> +		return dev_err_probe(&pdev->dev, PTR_ERR(saif->clk),
> +				     "Cannot get the clock\n");
>
>  	saif->base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(saif->base))
> --
> 2.43.0
>
>



More information about the linux-arm-kernel mailing list