Re: [PATCH] drm/imx: Add error handling in dw_hdmi_imx_probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Sep 24, 2023 at 11:36 AM liuhaoran <liuhaoran14@xxxxxxx> wrote:
>
> This patch adds error-handling for the of_match_node()
> inside the dw_hdmi_imx_probe().
>
> Signed-off-by: liuhaoran <liuhaoran14@xxxxxxx>
> ---
>  drivers/gpu/drm/imx/ipuv3/dw_hdmi-imx.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/imx/ipuv3/dw_hdmi-imx.c b/drivers/gpu/drm/imx/ipuv3/dw_hdmi-imx.c
> index a2277a0d6d06..3b25f018b2a6 100644
> --- a/drivers/gpu/drm/imx/ipuv3/dw_hdmi-imx.c
> +++ b/drivers/gpu/drm/imx/ipuv3/dw_hdmi-imx.c
> @@ -224,6 +224,9 @@ static int dw_hdmi_imx_probe(struct platform_device *pdev)
>         struct imx_hdmi *hdmi;
>         int ret;
>
> +       if (!match)
> +               return -ENODEV;
> +

This check is not needed.

The only way this driver can probe is via devicetree and this can only
happen when match is non-NULL.




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux