diff --git a/drivers/base/topology.c b/drivers/base/topology.c
index ae989c57cd5ec33cd1564ee949e0fab51b158b4a..4bf862a633df49076272e3b1bbb5de74c584c112 100644
--- a/drivers/base/topology.c
+++ b/drivers/base/topology.c
@@ -181,16 +181,20 @@ static int __cpuinit topology_cpu_callback(struct notifier_block *nfb,
 static int __cpuinit 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);