public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sysfs bits
@ 2003-05-15  3:31 davej
  2003-05-15  3:33 ` Patrick Mochel
  2003-05-15  5:06 ` Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: davej @ 2003-05-15  3:31 UTC (permalink / raw)
  To: mochel; +Cc: linux-kernel

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;
 }

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: sysfs bits
  2003-05-15  3:31 sysfs bits davej
@ 2003-05-15  3:33 ` Patrick Mochel
  2003-05-15  5:06 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Patrick Mochel @ 2003-05-15  3:33 UTC (permalink / raw)
  To: davej; +Cc: linux-kernel


On Thu, 15 May 2003 davej@codemonkey.org.uk wrote:

> Look sane ?

Sure. I'll add it to my tree.


	-pat


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: sysfs bits
  2003-05-15  3:31 sysfs bits davej
  2003-05-15  3:33 ` Patrick Mochel
@ 2003-05-15  5:06 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2003-05-15  5:06 UTC (permalink / raw)
  To: davej; +Cc: mochel, linux-kernel

On Thu, May 15, 2003 at 04:31:02AM +0100, davej@codemonkey.org.uk wrote:
> 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

Thanks, that was my fault for not fixing this properly the first time.

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-05-15  5:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-15  3:31 sysfs bits davej
2003-05-15  3:33 ` Patrick Mochel
2003-05-15  5:06 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox