diff mbox series

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

Message ID 20231218105718.2445136-6-alexander.stein@ew.tq-group.com (mailing list archive)
State New, archived
Headers show
Series dev_err_probe usage for imx8qxp DPU pipeline | expand

Commit Message

Alexander Stein Dec. 18, 2023, 10:57 a.m. UTC
This simplifies the code and gives additional information upon deferral.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
 drivers/gpu/drm/imx/dpu/dpu-dprc.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Alexander Stein Dec. 18, 2023, 12:03 p.m. UTC | #1
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@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);
diff mbox series

Patch

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);