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; + hdmi = devm_kzalloc(&pdev->dev, sizeof(*hdmi), GFP_KERNEL); if (!hdmi) return -ENOMEM; -- 2.17.1