Skip to contentSkip to conversation

of: Fix issue where code would fall through to error case.

PATCH Superseded Moritz Fischer 1 participant 1 message Nov 19, 2016 Device tree

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 of: Fix issue where code would fall through to error case.

No longer fall through into the error case that prints out an error if no error (err = 0) occurred.

Fixes d9181b20a83(of: Add back an error message, restructured)

---
Hi Rob,

this is Frank's suggestion. I don't have a strong preference one way or the other. Feel free to pick one or the other.

Cheers,

Moritz

---
 drivers/of/resolver.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/of/resolver.c +5 -5
index 783bd09..c47404f3 100644
@@ -358,14 +358,14 @@ int of_resolve_phandles(struct device_node *overlay)
 
 		err = update_usages_of_a_phandle_reference(overlay, prop, phandle);
 		if (err)
-			break;
+			goto err_out;
 	}
-
-err_out:
-	pr_err("overlay phandle fixup failed: %d\n", err);
 out:
 	of_node_put(tree_symbols);
-
 	return err;
+
+err_out:
+	pr_err("overlay phandle fixup failed: %d\n", err);
+	goto out;
 }
 EXPORT_SYMBOL_GPL(of_resolve_phandles);
Signature · 1 line
2.7.4