linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Afzal Mohammed <lazfamam@gmail.com>
To: tomi.valkeinen@nokia.com
Cc: ville.syrjala@nokia.com, tj@kernel.org, lazfamam@gmail.com,
	linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] OMAP:DSS2:OMAPFB: Fix probe error path
Date: Thu,  1 Jul 2010 19:10:01 +0530	[thread overview]
Message-ID: <1277991601-16528-2-git-send-email-lazfamam@gmail.com> (raw)
In-Reply-To: <1277991601-16528-1-git-send-email-lazfamam@gmail.com>

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>
---
 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 4b4506d..710e117 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -1928,13 +1928,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]);
@@ -2220,6 +2213,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:
-- 
1.7.0.4

  reply	other threads:[~2010-07-01 13:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-01 13:40 [PATCH] OMAP:DSS2:OMAPFB: Fix probe error path Afzal Mohammed
2010-07-01 13:40 ` Afzal Mohammed [this message]
2010-07-01 14:57   ` Tomi Valkeinen
  -- strict thread matches above, loose matches on Subject: below --
2010-07-05  6:38 Afzal Mohammed
2010-06-30 14:15 Afzal Mohammed
2010-07-01  9:54 ` Tomi Valkeinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1277991601-16528-2-git-send-email-lazfamam@gmail.com \
    --to=lazfamam@gmail.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=tomi.valkeinen@nokia.com \
    --cc=ville.syrjala@nokia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).