aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@nokia.com>2010-01-07 10:45:03 -0500
committerTomi Valkeinen <tomi.valkeinen@nokia.com>2010-01-12 05:10:55 -0500
commit807a7515aea421f2b340140482ed4c8811c523c6 (patch)
treef8ab9e4a19ad7dbf072303b7b3cbda2b3a6f6fe0
parent2d9c5597ad1408885fdef5838aa27a8a0ee9e915 (diff)
OMAP: DSS2: OMAPFB: fix crash when panel driver was not loaded
If the panel's probe had failed, omapfb would still go on, eventually crashing. A better fix would be to handle each display properly, and leaving just the failed display out. But that is a bigger change. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
-rw-r--r--drivers/video/omap2/omapfb/omapfb-main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index e61a75c31358..d17caef6915a 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -2115,6 +2115,11 @@ static int omapfb_probe(struct platform_device *pdev)
2115 dssdev = NULL; 2115 dssdev = NULL;
2116 for_each_dss_dev(dssdev) { 2116 for_each_dss_dev(dssdev) {
2117 omap_dss_get_device(dssdev); 2117 omap_dss_get_device(dssdev);
2118 if (!dssdev->driver) {
2119 dev_err(&pdev->dev, "no driver for display\n");
2120 r = -EINVAL;
2121 goto cleanup;
2122 }
2118 fbdev->displays[fbdev->num_displays++] = dssdev; 2123 fbdev->displays[fbdev->num_displays++] = dssdev;
2119 } 2124 }
2120 2125