From: Jianjun Kong <jianjun@zeuux.org>
To: spock@gentoo.org
Cc: Linux-Kernel-Mailing-List <linux-kernel@vger.kernel.org>,
linux-fbdev-devel@lists.sourceforge.net
Subject: [PATCH] drivers: process failure of sysfs_create_group()
Date: Mon, 10 Nov 2008 18:53:32 +0800 [thread overview]
Message-ID: <20081110105332.GA19358@ubuntu> (raw)
drivers: drivers/video/uvesafb.c:
When fail to call sysfs_create_group(), it should recycle resources and return the error.
This patch fix for processing failure of sysfs_create_group().
Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
---
drivers/video/uvesafb.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c
index 6c2d37f..a78d4d9 100644
--- a/drivers/video/uvesafb.c
+++ b/drivers/video/uvesafb.c
@@ -1811,12 +1811,16 @@ static int __devinit uvesafb_probe(struct platform_device *dev)
info->fix.id);
err = sysfs_create_group(&dev->dev.kobj, &uvesafb_dev_attgrp);
- if (err != 0)
+ if (err != 0) {
printk(KERN_WARNING "fb%d: failed to register attributes\n",
info->node);
+ goto out_frame;
+ }
return 0;
+our_frame:
+ unregister_framebuffer(info);
out_reg:
release_region(0x3c0, 32);
out_unmap:
--
1.5.6.3
next reply other threads:[~2008-11-10 10:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-10 10:53 Jianjun Kong [this message]
2008-11-10 21:30 ` [Linux-fbdev-devel] [PATCH] drivers: process failure of sysfs_create_group() Geert Uytterhoeven
2008-11-11 10:05 ` Michal Januszewski
2008-11-11 13:30 ` Jianjun Kong
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=20081110105332.GA19358@ubuntu \
--to=jianjun@zeuux.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=spock@gentoo.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.