Skip to content

Commit

Permalink
OMAP: DSS2: OMAPFB: Fix probe error path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Afzal Mohammed authored and Tomi Valkeinen committed Aug 5, 2010
1 parent f3fe53c commit e26ed44
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions drivers/video/omap2/omapfb/omapfb-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2005,13 +2005,6 @@ static int omapfb_create_framebuffers(struct omapfb2_device *fbdev)
}
}

DBG("create sysfs for fbs\n");
r = omapfb_create_sysfs(fbdev);
if (r) {
dev_err(fbdev->dev, "failed to create sysfs entries\n");
return r;
}

/* Enable fb0 */
if (fbdev->num_fbs > 0) {
struct omapfb_info *ofbi = FB2OFB(fbdev->fbs[0]);
Expand Down Expand Up @@ -2297,6 +2290,13 @@ static int omapfb_probe(struct platform_device *pdev)
}
}

DBG("create sysfs for fbs\n");
r = omapfb_create_sysfs(fbdev);
if (r) {
dev_err(fbdev->dev, "failed to create sysfs entries\n");
goto cleanup;
}

return 0;

cleanup:
Expand Down

0 comments on commit e26ed44

Please sign in to comment.