[PATCH] drm/imx: Add error handling in dw_hdmi_imx_probe()
Fabio Estevam
festevam at gmail.com
Sun Sep 24 14:40:50 UTC 2023
On Sun, Sep 24, 2023 at 11:36 AM liuhaoran <liuhaoran14 at 163.com> wrote:
>
> This patch adds error-handling for the of_match_node()
> inside the dw_hdmi_imx_probe().
>
> Signed-off-by: liuhaoran <liuhaoran14 at 163.com>
> ---
> 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.
More information about the dri-devel
mailing list