Re: [PATCH] gpio: pca953x: initialize ret to zero to avoid returning garbage

2016-09-13 Thread Colin Ian King
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 so

Re: [PATCH] gpio: pca953x: initialize ret to zero to avoid returning garbage

2016-09-13 Thread Linus Walleij
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 :

Re: [PATCH] gpio: pca953x: initialize ret to zero to avoid returning garbage

2016-09-13 Thread Arnd Bergmann
On Tuesday, September 13, 2016 12:04:00 PM CEST Phil Reid wrote: > On 12/09/2016 21:40, Linus Walleij wrote: > > On Fri, Sep 9, 2016 at 10:31 AM, Colin King > > wrote: > > > >> From: Colin Ian King > >> > >> ret is not initialized so it contains garbage. Ensure garbage > >> is not returned in t

Re: [PATCH] gpio: pca953x: initialize ret to zero to avoid returning garbage

2016-09-13 Thread Linus Walleij
On Tue, Sep 13, 2016 at 6:04 AM, Phil Reid wrote: > On 12/09/2016 21:40, Linus Walleij wrote: >> >> On Fri, Sep 9, 2016 at 10:31 AM, Colin King >> wrote: >> >>> From: Colin Ian King >>> >>> ret is not initialized so it contains garbage. Ensure garbage >>> is not returned in the case that pdata

Re: [PATCH] gpio: pca953x: initialize ret to zero to avoid returning garbage

2016-09-12 Thread Phil Reid
On 12/09/2016 21:40, Linus Walleij wrote: On Fri, Sep 9, 2016 at 10:31 AM, Colin King wrote: From: Colin Ian King ret is not initialized so it contains garbage. Ensure garbage is not returned in the case that pdata && pdata->teardown is false by initializing ret to 0. Signed-off-by: Colin

Re: [PATCH] gpio: pca953x: initialize ret to zero to avoid returning garbage

2016-09-12 Thread Linus Walleij
On Fri, Sep 9, 2016 at 10:31 AM, Colin King wrote: > From: Colin Ian King > > ret is not initialized so it contains garbage. Ensure garbage > is not returned in the case that pdata && pdata->teardown is false > by initializing ret to 0. > > Signed-off-by: Colin Ian King Patch applied. Yours,

[PATCH] gpio: pca953x: initialize ret to zero to avoid returning garbage

2016-09-09 Thread Colin King
From: Colin Ian King ret is not initialized so it contains garbage. Ensure garbage is not returned in the case that pdata && pdata->teardown is false by initializing ret to 0. Signed-off-by: Colin Ian King --- drivers/gpio/gpio-pca953x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)