diff options
author | Paul Taysom <taysom@chromium.org> | 2014-05-09 08:06:28 +0200 |
---|---|---|
committer | Inki Dae <daeinki@gmail.com> | 2014-06-01 19:07:07 +0200 |
commit | b21a3bf4418899bcb74cbef2e4d3bb976a6f1157 (patch) | |
tree | 4afc8282f293adbc1af97f5dee6c80d8c0f9cece /drivers/gpu/drm/exynos | |
parent | drm/exynos: Debounce HDMI hotplug interrupts (diff) | |
download | linux-b21a3bf4418899bcb74cbef2e4d3bb976a6f1157.tar.xz linux-b21a3bf4418899bcb74cbef2e4d3bb976a6f1157.zip |
drm/exynos: check for null pointers in error handling
Smatch error from arm build: drivers/gpu/drm/exynos/
exynos_hdmi.c:2374 hdmi_probe() error: potential NULL
dereference 'hdata->hdmiphy_port'.
Added check for hdata->hdmiphy_port that it is not NULL.
Signed-off-by: Paul Taysom <taysom@chromium.org>
Signed-off-by: Rahul Sharma <Rahul.Sharma@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_hdmi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 73a7acb1283c..0dc9e3c9d103 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -2174,7 +2174,8 @@ static int hdmi_probe(struct platform_device *pdev) return exynos_drm_component_add(&pdev->dev, &hdmi_component_ops); err_hdmiphy: - put_device(&hdata->hdmiphy_port->dev); + if (hdata->hdmiphy_port) + put_device(&hdata->hdmiphy_port->dev); err_ddc: put_device(&hdata->ddc_adpt->dev); return ret; |