of: reserved_mem: fix cell count for memory-region property
[linux-3.10.git] / drivers / of / of_reserved_mem.c
index eb63946..2275432 100644 (file)
@@ -247,10 +247,10 @@ int of_reserved_mem_device_init(struct device *dev)
 {
        struct reserved_mem *rmem;
        struct of_phandle_iter iter;
-       int err;
+       int err = -ENODEV;
 
        of_property_for_each_phandle_with_args(iter, dev->of_node, "memory-region",
-                                              NULL, 1) {
+                                              NULL, 0) {
                struct of_phandle_args *ret = &iter.out_args;
 
                if (!ret->np)