diff options
author | Afzal Mohammed <lazfamam@gmail.com> | 2010-07-01 09:40:01 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@nokia.com> | 2010-08-05 09:52:15 -0400 |
commit | e26ed44c950ed9d1feb7719100f475e4e80f1419 (patch) | |
tree | 538300a14220b9c22937ea414ce16a9ba700c0f9 /drivers/video | |
parent | f3fe53c12000adfd50b6a111bd0f5b27a412ca31 (diff) |
OMAP: DSS2: OMAPFB: Fix probe error path
Move sysfs entry creation to omapfb_probe() from omapfb_create_framebuffers().
This will make sure that sysfs entry is not left behind in case of unsuccessful
probe due to failure in enabling fb0 of omapfb_create_framebuffers().
Signed-off-by: Afzal Mohammed <lazfamam@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/omap2/omapfb/omapfb-main.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index 4abb1d17231b..e51b7bf64307 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c | |||
@@ -2005,13 +2005,6 @@ static int omapfb_create_framebuffers(struct omapfb2_device *fbdev) | |||
2005 | } | 2005 | } |
2006 | } | 2006 | } |
2007 | 2007 | ||
2008 | DBG("create sysfs for fbs\n"); | ||
2009 | r = omapfb_create_sysfs(fbdev); | ||
2010 | if (r) { | ||
2011 | dev_err(fbdev->dev, "failed to create sysfs entries\n"); | ||
2012 | return r; | ||
2013 | } | ||
2014 | |||
2015 | /* Enable fb0 */ | 2008 | /* Enable fb0 */ |
2016 | if (fbdev->num_fbs > 0) { | 2009 | if (fbdev->num_fbs > 0) { |
2017 | struct omapfb_info *ofbi = FB2OFB(fbdev->fbs[0]); | 2010 | struct omapfb_info *ofbi = FB2OFB(fbdev->fbs[0]); |
@@ -2297,6 +2290,13 @@ static int omapfb_probe(struct platform_device *pdev) | |||
2297 | } | 2290 | } |
2298 | } | 2291 | } |
2299 | 2292 | ||
2293 | DBG("create sysfs for fbs\n"); | ||
2294 | r = omapfb_create_sysfs(fbdev); | ||
2295 | if (r) { | ||
2296 | dev_err(fbdev->dev, "failed to create sysfs entries\n"); | ||
2297 | goto cleanup; | ||
2298 | } | ||
2299 | |||
2300 | return 0; | 2300 | return 0; |
2301 | 2301 | ||
2302 | cleanup: | 2302 | cleanup: |