gpu/drm/exynos/exynos_hdmi - Unmap region obtained by of_iomap
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Wed, 19 Oct 2016 10:04:16 +0000 (15:34 +0530)
committerDave Airlie <airlied@redhat.com>
Thu, 24 Nov 2016 23:57:51 +0000 (09:57 +1000)
Free memory mapping, if hdmi_probe is not successful.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/exynos/exynos_hdmi.c

index e8fb6ef947eea388ac0425054c6ce928bf453a5d..38eaa63afb31f61125314893d154ec03171cb3e1 100644 (file)
@@ -1907,6 +1907,8 @@ err_disable_pm_runtime:
 err_hdmiphy:
        if (hdata->hdmiphy_port)
                put_device(&hdata->hdmiphy_port->dev);
+       if (hdata->regs_hdmiphy)
+               iounmap(hdata->regs_hdmiphy);
 err_ddc:
        put_device(&hdata->ddc_adpt->dev);
 
@@ -1929,6 +1931,9 @@ static int hdmi_remove(struct platform_device *pdev)
        if (hdata->hdmiphy_port)
                put_device(&hdata->hdmiphy_port->dev);
 
+       if (hdata->regs_hdmiphy)
+               iounmap(hdata->regs_hdmiphy);
+
        put_device(&hdata->ddc_adpt->dev);
 
        return 0;