Skip to content

Commit

Permalink
drm/exynos: hdmi: add null check for hdmiphy_port
Browse files Browse the repository at this point in the history
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 <sw0312.kim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
  • Loading branch information
Seung-Woo Kim authored and Inki Dae committed Aug 4, 2014
1 parent f1e716d commit 9d1e25c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/exynos/exynos_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9d1e25c

Please sign in to comment.