Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
[firefly-linux-kernel-4.4.55.git] / drivers / pci / hotplug / rpaphp_core.c
index 93aa29f6d39c5b3a06e699f13f72a8c960b7da34..f2945fa73d4ffeeb5010358b5cc63fce32b73a5a 100644 (file)
@@ -375,11 +375,11 @@ static void __exit cleanup_slots(void)
 
 static int __init rpaphp_init(void)
 {
-       struct device_node *dn = NULL;
+       struct device_node *dn;
 
        info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
 
-       while ((dn = of_find_node_by_name(dn, "pci")))
+       for_each_node_by_name(dn, "pci")
                rpaphp_add_slot(dn);
 
        return 0;