Skip to contentSkip to conversation

OMAP:DSS2:OMAPFB: Fix probe error path

PATCH In review Afzal Mohammed 2 participants 3 messages Jun 30, 2010 – Jul 5, 2010 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 OMAP:DSS2:OMAPFB: Fix probe error path

If enabling fb0 fails in omapfb_create_framebuffers(), remove sysfs file before returning to probe. This is required to complete the cleanup in the above mentioned error case.

---
 drivers/video/omap2/omapfb/omapfb-main.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/video/omap2/omapfb/omapfb-main.c +1 -0
index 4b4506d..2319b81 100644
@@ -1945,6 +1945,7 @@ static int omapfb_create_framebuffers(struct omapfb2_device *fbdev)
 			r = omapfb_overlay_enable(ovl, 1);
 
 			if (r) {
+				omapfb_remove_sysfs(fbdev);
 				dev_err(fbdev->dev,
 						"failed to enable overlay\n");
 				return r;
Signature · 1 line
1.7.0.4
#1 lore raw

Hi,

Quoted 3 lines · ext Afzal Mohammed

If enabling fb0 fails in omapfb_create_framebuffers(), remove sysfs file before returning to probe. This is required to complete the cleanup in the above mentioned error case.

omapfb frees the resources in omapfb_free_resources(). I believe removing sysfs should also be put into omapfb_free_resources() to be consistent, and not as an explicit call like in this patch.

However, I'm not sure if some sysfs-allocated flag is needed for this to work in all cases.

Tomi

#2 lore raw

PATCH 1/1 OMAP:DSS2:OMAPFB: Fix probe error path

In reply to Afzal Mohammed

This is a multi-part message in MIME format. To properly display this message you need a MIME-Version 1.0 compliant Email program.

------MIME delimiter for sendEmail-700403.923475282

Content-Type: text/plain;
        charset="iso-8859-1"

Content-Transfer-Encoding: 7bit

Hi Tomi,

Can you please help this change get integrated onto mainline kernel.

Regards
Afzal

------MIME delimiter for sendEmail-700403.923475282--