Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753357AbcKSAsY (ORCPT ); Fri, 18 Nov 2016 19:48:24 -0500 Received: from mail-pf0-f169.google.com ([209.85.192.169]:34104 "EHLO mail-pf0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752214AbcKSAsX (ORCPT ); Fri, 18 Nov 2016 19:48:23 -0500 From: Moritz Fischer To: linux-kernel@vger.kernel.org Cc: pantelis.antoniou@konsulko.com, robh+dt@kernel.org, frowand.list@gmail.com, devicetree@kernel.org, moritz@pure-entropy.org, Moritz Fischer Subject: [PATCH v2] of: Fix issue where code would fall through to error case. Date: Fri, 18 Nov 2016 16:48:09 -0800 Message-Id: <1479516489-5898-1-git-send-email-moritz.fischer@ettus.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1102 Lines: 45 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 Reviewed-by: Frank Rowand --- 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