This is an unlikely case. However to silence the following smatch error
add a NULL check:
drivers/gpu/drm/exynos/exynos_hdmi.c:2486 hdmi_probe()
error: potential NULL dereference 'match'.

Signed-off-by: Sachin Kamat <sachin.ka...@linaro.org>
---
 drivers/gpu/drm/exynos/exynos_hdmi.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c 
b/drivers/gpu/drm/exynos/exynos_hdmi.c
index fdd353d..53244c2 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -2483,6 +2483,8 @@ static int __devinit hdmi_probe(struct platform_device 
*pdev)
                const struct of_device_id *match;
                match = of_match_node(of_match_ptr(hdmi_match_types),
                                        pdev->dev.of_node);
+               if (match == NULL)
+                       return -ENODEV;
                hdata->type = (enum hdmi_type)match->data;
        } else {
                hdata->type = (enum hdmi_type)platform_get_device_id
-- 
1.7.4.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to