summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/rfbi.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2013-03-14 14:47:29 +0100
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-06-17 13:00:39 +0200
commitc6ca5b2201289995f70ee19c0eaf4b5f2ae09923 (patch)
treeacf7cce67a9df7ec5bf959bc9af390afc510aa2d /drivers/video/omap2/dss/rfbi.c
parentOMAPDSS: add pdata->default_display_name (diff)
downloadlinux-c6ca5b2201289995f70ee19c0eaf4b5f2ae09923.tar.xz
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/rfbi.c')
-rw-r--r--drivers/video/omap2/dss/rfbi.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c
index 1a17dd1447dc..1ff221edc359 100644
--- a/drivers/video/omap2/dss/rfbi.c
+++ b/drivers/video/omap2/dss/rfbi.c
@@ -1093,15 +1093,16 @@ static int omap_rfbihw_probe(struct platform_device *pdev)
rfbi_init_output(pdev);
- r = rfbi_probe_pdata(pdev);
- if (r) {
- rfbi_uninit_output(pdev);
- pm_runtime_disable(&pdev->dev);
- return r;
+ if (pdev->dev.platform_data) {
+ r = rfbi_probe_pdata(pdev);
+ if (r)
+ goto err_probe;
}
return 0;
+err_probe:
+ rfbi_uninit_output(pdev);
err_runtime_get:
pm_runtime_disable(&pdev->dev);
return r;