Message ID | 20140310204012.10746.6803.stgit@srivatsabhat.in.ibm.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
diff --git a/drivers/base/topology.c b/drivers/base/topology.c index 94ffee3..a738d10 100644 --- a/drivers/base/topology.c +++ b/drivers/base/topology.c @@ -161,16 +161,20 @@ static int topology_cpu_callback(struct notifier_block *nfb, static int topology_sysfs_init(void) { int cpu; - int rc; + int rc = 0; + + cpu_notifier_register_begin(); for_each_online_cpu(cpu) { rc = topology_add_dev(cpu); if (rc) - return rc; + goto out; } - hotcpu_notifier(topology_cpu_callback, 0); + __hotcpu_notifier(topology_cpu_callback, 0); - return 0; +out: + cpu_notifier_register_done(); + return rc; } device_initcall(topology_sysfs_init);