diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-06-04 06:06:37 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-06-17 06:44:44 -0400 |
commit | f5a1a1f8e41e93584935d4ae62a84280dcdbe778 (patch) | |
tree | 8dcb27c3ee11fa1ebbdc6d4e4b4a2add8b02c67d /drivers/video | |
parent | 7e328f5adcabb0b08e713f202b4a0fc388b2319e (diff) |
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')
-rw-r--r-- | drivers/video/fbdev/omap2/dss/dss.c | 9 |
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) | |||
1125 | if (r) | 1125 | if (r) |
1126 | goto err_pll_init; | 1126 | goto err_pll_init; |
1127 | 1127 | ||
1128 | r = dss_init_ports(pdev); | ||
1129 | if (r) | ||
1130 | goto err_init_ports; | ||
1131 | |||
1128 | pm_runtime_enable(&pdev->dev); | 1132 | pm_runtime_enable(&pdev->dev); |
1129 | 1133 | ||
1130 | r = dss_runtime_get(); | 1134 | r = dss_runtime_get(); |
@@ -1149,8 +1153,6 @@ static int __init omap_dsshw_probe(struct platform_device *pdev) | |||
1149 | dss.lcd_clk_source[0] = OMAP_DSS_CLK_SRC_FCK; | 1153 | dss.lcd_clk_source[0] = OMAP_DSS_CLK_SRC_FCK; |
1150 | dss.lcd_clk_source[1] = OMAP_DSS_CLK_SRC_FCK; | 1154 | dss.lcd_clk_source[1] = OMAP_DSS_CLK_SRC_FCK; |
1151 | 1155 | ||
1152 | dss_init_ports(pdev); | ||
1153 | |||
1154 | rev = dss_read_reg(DSS_REVISION); | 1156 | rev = dss_read_reg(DSS_REVISION); |
1155 | printk(KERN_INFO "OMAP DSS rev %d.%d\n", | 1157 | printk(KERN_INFO "OMAP DSS rev %d.%d\n", |
1156 | FLD_GET(rev, 7, 4), FLD_GET(rev, 3, 0)); | 1158 | FLD_GET(rev, 7, 4), FLD_GET(rev, 3, 0)); |
@@ -1167,7 +1169,8 @@ static int __init omap_dsshw_probe(struct platform_device *pdev) | |||
1167 | 1169 | ||
1168 | err_runtime_get: | 1170 | err_runtime_get: |
1169 | pm_runtime_disable(&pdev->dev); | 1171 | pm_runtime_disable(&pdev->dev); |
1170 | 1172 | dss_uninit_ports(pdev); | |
1173 | err_init_ports: | ||
1171 | if (dss.video1_pll) | 1174 | if (dss.video1_pll) |
1172 | dss_video_pll_uninit(dss.video1_pll); | 1175 | dss_video_pll_uninit(dss.video1_pll); |
1173 | 1176 | ||