From: Seung-Woo Kim Date: Mon, 28 Jul 2014 08:15:22 +0000 (+0900) Subject: drm/exynos: hdmi: add null check for hdmiphy_port X-Git-Tag: v4.14-rc1~7068^2~23^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9d1e25c9982b97f5f3f2b9c885e823ee58a9fb3d;p=platform%2Fkernel%2Flinux-rpi.git drm/exynos: hdmi: add null check for hdmiphy_port The hdmiphy can be apb and hdmiphy_port can be null. So before accessing hdmiphy_port, it should be checked. Signed-off-by: Seung-Woo Kim Signed-off-by: Inki Dae --- diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index d08e00d..562966d 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -2521,7 +2521,8 @@ static int hdmi_remove(struct platform_device *pdev) if (hdata->res.reg_hdmi_en) regulator_disable(hdata->res.reg_hdmi_en); - put_device(&hdata->hdmiphy_port->dev); + if (hdata->hdmiphy_port) + put_device(&hdata->hdmiphy_port->dev); put_device(&hdata->ddc_adpt->dev); pm_runtime_disable(&pdev->dev);