From: davej@codemonkey.org.uk
To: mochel@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: sysfs bits
Date: Thu, 15 May 2003 04:31:02 +0100 [thread overview]
Message-ID: <200305150331.h4F3V21s000551@deviant.impure.org.uk> (raw)
Look sane ?
diff -urpN --exclude-from=/home/davej/.exclude bk-linus/drivers/base/cpu.c linux-2.5/drivers/base/cpu.c
--- bk-linus/drivers/base/cpu.c 2003-04-30 16:02:26.000000000 +0100
+++ linux-2.5/drivers/base/cpu.c 2003-05-01 03:12:55.000000000 +0100
@@ -46,7 +46,7 @@ int __init register_cpu(struct cpu *cpu,
snprintf(cpu->sysdev.class_dev.class_id, BUS_ID_SIZE, "cpu%d", num);
retval = class_device_register(&cpu->sysdev.class_dev);
if (retval) {
- // FIXME cleanup sys_device_register
+ sys_device_unregister(&cpu->sysdev);
return retval;
}
return 0;
@@ -58,10 +58,12 @@ int __init cpu_dev_init(void)
int error;
error = class_register(&cpu_class);
- if (!error) {
- error = driver_register(&cpu_driver);
- if (error)
- class_unregister(&cpu_class);
- }
+ if (error)
+ goto out;
+
+ error = driver_register(&cpu_driver);
+ if (error)
+ class_unregister(&cpu_class);
+out:
return error;
}
next reply other threads:[~2003-05-15 3:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-15 3:31 davej [this message]
2003-05-15 3:33 ` Patrick Mochel
2003-05-15 5:06 ` Greg KH
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=200305150331.h4F3V21s000551@deviant.impure.org.uk \
--to=davej@codemonkey.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@osdl.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®