From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755443AbcIMMrN (ORCPT ); Tue, 13 Sep 2016 08:47:13 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:46549 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751608AbcIMMrJ (ORCPT ); Tue, 13 Sep 2016 08:47:09 -0400 Subject: Re: [PATCH] gpio: pca953x: initialize ret to zero to avoid returning garbage To: Linus Walleij , Arnd Bergmann References: <20160909083154.26442-1-colin.king@canonical.com> <944b682f-6217-f759-7429-339274cd5894@electromag.com.au> <18457294.js4cyg49EU@wuerfel> Cc: Phil Reid , Alexandre Courbot , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" From: Colin Ian King Message-ID: <5e5928e0-7a7a-915e-1090-726cc502f3ce@canonical.com> Date: Tue, 13 Sep 2016 13:45:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/09/16 13:46, Linus Walleij wrote: > On Tue, Sep 13, 2016 at 2:31 PM, Arnd Bergmann wrote: > >> Please try to avoid adding initializations in the local variable >> declaration, they just hide otherwise useful warnings when >> you get a function that actually does something incorrect >> in some code paths. > > Agreed, sorry for my ignorance :( > > I duly corrected the git and reverted the other patch instead of yours. > > Yours, > Linus Walleij > Makes sense. Thanks Linus