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;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Thu May 15 2003 - 22:00:55 EST