On Wed, Apr 02, 2025 at 07:38:52PM +0800, shao.ming...@zte.com.cn wrote:
> From: Zhang Enpei <zhang.en...@zte.com.cn>
> 
> Replace the open-code with dev_err_probe() to simplify the code.
> 
> Signed-off-by: Zhang Enpei <zhang.en...@zte.com.cn>
> Signed-off-by: Shao Mingyin <shao.ming...@zte.com.cn>

Reviewed-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com>

> ---
>  drivers/gpu/drm/xlnx/zynqmp_dp.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c 
> b/drivers/gpu/drm/xlnx/zynqmp_dp.c
> index a6a4a871f197..28efa4c7ec8e 100644
> --- a/drivers/gpu/drm/xlnx/zynqmp_dp.c
> +++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c
> @@ -2466,10 +2466,8 @@ int zynqmp_dp_probe(struct zynqmp_dpsub *dpsub)
> 
>       dp->reset = devm_reset_control_get(dp->dev, NULL);
>       if (IS_ERR(dp->reset)) {
> -             if (PTR_ERR(dp->reset) != -EPROBE_DEFER)
> -                     dev_err(dp->dev, "failed to get reset: %ld\n",
> -                             PTR_ERR(dp->reset));
> -             ret = PTR_ERR(dp->reset);
> +             ret = dev_err_probe(dp->dev, PTR_ERR(dp->reset),
> +                                 "failed to get reset\n");
>               goto err_free;
>       }
> 

-- 
Regards,

Laurent Pinchart

Reply via email to