summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/dpi.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2013-03-14 15:47:29 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-06-17 14:00:39 +0300
commitc6ca5b2201289995f70ee19c0eaf4b5f2ae09923 (patch)
treeacf7cce67a9df7ec5bf959bc9af390afc510aa2d /drivers/video/omap2/dss/dpi.c
parent0a20012605033c8acd8b2c209c422d78880e2896 (diff)
downloadblackbird-op-linux-c6ca5b2201289995f70ee19c0eaf4b5f2ae09923.tar.gz
blackbird-op-linux-c6ca5b2201289995f70ee19c0eaf4b5f2ae09923.zip
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/dpi.c')
-rw-r--r--drivers/video/omap2/dss/dpi.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
index 757b57f7275a..ef8fca211abe 100644
--- a/drivers/video/omap2/dss/dpi.c
+++ b/drivers/video/omap2/dss/dpi.c
@@ -706,13 +706,17 @@ static int omap_dpi_probe(struct platform_device *pdev)
dpi_init_output(pdev);
- r = dpi_probe_pdata(pdev);
- if (r) {
- dpi_uninit_output(pdev);
- return r;
+ if (pdev->dev.platform_data) {
+ r = dpi_probe_pdata(pdev);
+ if (r)
+ goto err_probe;
}
return 0;
+
+err_probe:
+ dpi_uninit_output(pdev);
+ return r;
}
static int __exit omap_dpi_remove(struct platform_device *pdev)
OpenPOWER on IntegriCloud