aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/dsi.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2013-03-14 09:47:29 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-06-17 07:00:39 -0400
commitc6ca5b2201289995f70ee19c0eaf4b5f2ae09923 (patch)
treeacf7cce67a9df7ec5bf959bc9af390afc510aa2d /drivers/video/omap2/dss/dsi.c
parent0a20012605033c8acd8b2c209c422d78880e2896 (diff)
OMAPDSS: only probe pdata if there's one
omapdss output drivers always read the platform data. This crashes when there's no platform data when using DT. Add a check to read the platform data only if it exists. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/dsi.c')
-rw-r--r--drivers/video/omap2/dss/dsi.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index a73dedc33101..bdddd0d177b6 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -5563,12 +5563,10 @@ static int omap_dsihw_probe(struct platform_device *dsidev)
5563 5563
5564 dsi_init_output(dsidev); 5564 dsi_init_output(dsidev);
5565 5565
5566 r = dsi_probe_pdata(dsidev); 5566 if (dsidev->dev.platform_data) {
5567 if (r) { 5567 r = dsi_probe_pdata(dsidev);
5568 dsi_runtime_put(dsidev); 5568 if (r)
5569 dsi_uninit_output(dsidev); 5569 goto err_probe;
5570 pm_runtime_disable(&dsidev->dev);
5571 return r;
5572 } 5570 }
5573 5571
5574 dsi_runtime_put(dsidev); 5572 dsi_runtime_put(dsidev);
@@ -5586,6 +5584,9 @@ static int omap_dsihw_probe(struct platform_device *dsidev)
5586#endif 5584#endif
5587 return 0; 5585 return 0;
5588 5586
5587err_probe:
5588 dsi_runtime_put(dsidev);
5589 dsi_uninit_output(dsidev);
5589err_runtime_get: 5590err_runtime_get:
5590 pm_runtime_disable(&dsidev->dev); 5591 pm_runtime_disable(&dsidev->dev);
5591 return r; 5592 return r;