summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev
diff options
context:
space:
mode:
authorTomi Valkeinen2015-06-04 12:06:37 +0200
committerTomi Valkeinen2015-06-17 12:44:44 +0200
commitf5a1a1f8e41e93584935d4ae62a84280dcdbe778 (patch)
tree8dcb27c3ee11fa1ebbdc6d4e4b4a2add8b02c67d /drivers/video/fbdev
parentOMAPDSS: refactor dss probe function (diff)
downloadkernel-qcow2-linux-f5a1a1f8e41e93584935d4ae62a84280dcdbe778.tar.gz
kernel-qcow2-linux-f5a1a1f8e41e93584935d4ae62a84280dcdbe778.tar.xz
kernel-qcow2-linux-f5a1a1f8e41e93584935d4ae62a84280dcdbe778.zip
OMAPDSS: fix dss_init_ports error handling
The return value of dss_init_ports() is not handled at all, causing crashes later if the call failed. This patch adds the error handling, and we also move the call to a slightly earlier place to make bailing out easier. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r--drivers/video/fbdev/omap2/dss/dss.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/video/fbdev/omap2/dss/dss.c b/drivers/video/fbdev/omap2/dss/dss.c
index 1ce47441efe3..28e6ff053b47 100644
--- a/drivers/video/fbdev/omap2/dss/dss.c
+++ b/drivers/video/fbdev/omap2/dss/dss.c
@@ -1125,6 +1125,10 @@ static int __init omap_dsshw_probe(struct platform_device *pdev)
if (r)
goto err_pll_init;
+ r = dss_init_ports(pdev);
+ if (r)
+ goto err_init_ports;
+
pm_runtime_enable(&pdev->dev);
r = dss_runtime_get();
@@ -1149,8 +1153,6 @@ static int __init omap_dsshw_probe(struct platform_device *pdev)
dss.lcd_clk_source[0] = OMAP_DSS_CLK_SRC_FCK;
dss.lcd_clk_source[1] = OMAP_DSS_CLK_SRC_FCK;
- dss_init_ports(pdev);
-
rev = dss_read_reg(DSS_REVISION);
printk(KERN_INFO "OMAP DSS rev %d.%d\n",
FLD_GET(rev, 7, 4), FLD_GET(rev, 3, 0));
@@ -1167,7 +1169,8 @@ static int __init omap_dsshw_probe(struct platform_device *pdev)
err_runtime_get:
pm_runtime_disable(&pdev->dev);
-
+ dss_uninit_ports(pdev);
+err_init_ports:
if (dss.video1_pll)
dss_video_pll_uninit(dss.video1_pll);