OMAP: DSS2: OMAPFB: fix cleanup on dssdev enable error
authorTomi Valkeinen <tomi.valkeinen@nokia.com>
Wed, 17 Feb 2010 11:38:08 +0000 (13:38 +0200)
committerTomi Valkeinen <tomi.valkeinen@nokia.com>
Thu, 18 Feb 2010 11:19:55 +0000 (13:19 +0200)
If enabling a dss device failed, omapfb didn't exit, leading to crash.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
drivers/video/omap2/omapfb/omapfb-main.c

index 973bf79380864cc445d8841b51745fa829b41885..6a383ab2bef283d98e06a466ba4beca42cc0fd52 100644 (file)
@@ -2176,9 +2176,11 @@ static int omapfb_probe(struct platform_device *pdev)
                u16 w, h;
 #endif
                r = def_display->enable(def_display);
-               if (r)
+               if (r) {
                        dev_warn(fbdev->dev, "Failed to enable display '%s'\n",
                                        def_display->name);
+                       goto cleanup;
+               }
 
                /* set the update mode */
                if (def_display->caps & OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE) {