From: Jeff Garzik <jeff@garzik.org>
To: Matt_Domsch@dell.com, Andrew Morton <akpm@osdl.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] firmware/efivars: handle error
Date: Tue, 10 Oct 2006 09:19:49 -0400 [thread overview]
Message-ID: <20061010131949.GA9064@havoc.gtf.org> (raw)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
---
drivers/firmware/efivars.c | 7 ++++++-
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
index 8ebce1c..5ab5e39 100644
--- a/drivers/firmware/efivars.c
+++ b/drivers/firmware/efivars.c
@@ -639,7 +639,12 @@ efivar_create_sysfs_entry(unsigned long
kobject_set_name(&new_efivar->kobj, "%s", short_name);
kobj_set_kset_s(new_efivar, vars_subsys);
- kobject_register(&new_efivar->kobj);
+ i = kobject_register(&new_efivar->kobj);
+ if (i) {
+ kfree(short_name);
+ kfree(new_efivar);
+ return 1;
+ }
kfree(short_name);
short_name = NULL;
next reply other threads:[~2006-10-10 13:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-10 13:19 Jeff Garzik [this message]
2006-10-10 13:29 ` Matt Domsch
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=20061010131949.GA9064@havoc.gtf.org \
--to=jeff@garzik.org \
--cc=Matt_Domsch@dell.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®