[PATCH 5/6] drm/bridge: dpu-dprc: Use dev_err_probe

Alexander Stein alexander.stein at ew.tq-group.com
Mon Dec 18 04:03:12 PST 2023


Am Montag, 18. Dezember 2023, 11:57:17 CET schrieb Alexander Stein:
> This simplifies the code and gives additional information upon deferral.

Please ignore. I just noticed this file is added in a locally applied series.

Thanks
Alexander

> Signed-off-by: Alexander Stein <alexander.stein at ew.tq-group.com>
> ---
>  drivers/gpu/drm/imx/dpu/dpu-dprc.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/imx/dpu/dpu-dprc.c
> b/drivers/gpu/drm/imx/dpu/dpu-dprc.c index 261c9566721e..6467ad960080
> 100644
> --- a/drivers/gpu/drm/imx/dpu/dpu-dprc.c
> +++ b/drivers/gpu/drm/imx/dpu/dpu-dprc.c
> @@ -612,7 +612,8 @@ static int dpu_dprc_probe(struct platform_device *pdev)
> 
>  		dprc->prgs[i] = dpu_prg_lookup_by_phandle(dev, "fsl,prgs", 
i);
>  		if (!dprc->prgs[i])
> -			return -EPROBE_DEFER;
> +			return dev_err_probe(dev, -EPROBE_DEFER,
> +					     "Failed to lookup 
fsl,prgs\n");
> 
>  		if (i == 1)
>  			dpu_prg_set_auxiliary(dprc->prgs[i]);
> @@ -623,11 +624,10 @@ static int dpu_dprc_probe(struct platform_device
> *pdev)
> 
>  	ret = devm_request_irq(dev, wrap_irq, dpu_dprc_wrap_irq_handler,
>  			       IRQF_SHARED, dev_name(dev), dprc);
> -	if (ret < 0) {
> -		dev_err(dev, "failed to request dpr_wrap irq(%u): %d\n",
> -			wrap_irq, ret);
> -		return ret;
> -	}
> +	if (ret < 0)
> +		return dev_err_probe(dev, ret,
> +				     "failed to request dpr_wrap 
irq(%u)\n",
> +				     wrap_irq);
> 
>  	platform_set_drvdata(pdev, dprc);


-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/





More information about the linux-arm-kernel mailing list