From 6d2e0bd60848e97756f40e49da207e862f4f3851 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 17 Feb 2010 13:38:08 +0200 Subject: OMAP: DSS2: OMAPFB: fix cleanup on dssdev enable error If enabling a dss device failed, omapfb didn't exit, leading to crash. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/omapfb/omapfb-main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/video') diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index 973bf793808..6a383ab2bef 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c @@ -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) { -- cgit v1.2.3-70-g09d2