Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1525825 > unrolled thread

[PATCH v2] of: Fix issue where code would fall through to error case.

Started byMoritz Fischer <moritz.fischer@ettus.com>
First post2016-11-19 01:50 +0100
Last post2016-11-19 01:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] of: Fix issue where code would fall through to error case. Moritz Fischer <moritz.fischer@ettus.com> - 2016-11-19 01:50 +0100

#1525825 — [PATCH v2] of: Fix issue where code would fall through to error case.

FromMoritz Fischer <moritz.fischer@ettus.com>
Date2016-11-19 01:50 +0100
Subject[PATCH v2] of: Fix issue where code would fall through to error case.
Message-ID<sF20V-65c-1@gated-at.bofh.it>
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)
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Reviewed-by: Frank Rowand <frank.rowand@am.sony.com>
---
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(-)

diff --git a/drivers/of/resolver.c b/drivers/of/resolver.c
index 783bd09..c47404f3 100644
--- a/drivers/of/resolver.c
+++ b/drivers/of/resolver.c
@@ -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);
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web