Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933164AbcK2Slf (ORCPT ); Tue, 29 Nov 2016 13:41:35 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:35670 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932403AbcK2Sl1 (ORCPT ); Tue, 29 Nov 2016 13:41:27 -0500 Subject: Re: [PATCH v3 1/2] of: Fix issue where code would fall through to error case. To: Moritz Fischer , devicetree@vger.kernel.org References: <1480278058-19688-1-git-send-email-moritz.fischer@ettus.com> Cc: linux-kernel@vger.kernel.org, robh+dt@kernel.org, pantelis.antoniou@konsulko.com, mdf@kernel.org From: Frank Rowand Message-ID: <583DCBD4.4010908@gmail.com> Date: Tue, 29 Nov 2016 10:41:24 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1480278058-19688-1-git-send-email-moritz.fischer@ettus.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1008 Lines: 29 On 11/27/16 12:20, Moritz Fischer wrote: > No longer fall through into the error case that prints out > an error if no error (err = 0) occurred. > > Rework error handling to print error where it occured instead > of having a global catch-all at the end of the function. > > Fixes d9181b20a83(of: Add back an error message, restructured) > Signed-off-by: Moritz Fischer > Reviewed-by: Frank Rowand > --- > Hi Rob, Frank > > this has already Frank's Reviewed-by: tag on it, but since I changed around the > earlier part (before tree_node gets assigned) Frank might wanna take another look > at this. < snip > Hi Moritz, I agree with Rob's suggested one line solution (that I initially misunderstood). The one line fix is to add "if (err)" immediately following label "err_out" in of_resolve_phandles(). As far as patch 2/2, I'm not bothered by the two instances of line over 80 chars. But if Rob wants to take patch 2/2 I have no objection. -Frank