Re: [PATCH v2] pinctrl: madera: Fix uninitialized variable bug in madera_mux_set_mux

2018-10-12 Thread Gustavo A. R. Silva
On 10/11/18 10:40 AM, Linus Walleij wrote: >> Changes in v2: >> - Initialize variable ret to 0 instead of -1. Thanks to Charles Keepax >>for pointing this out. >> - Update subject and commit log. > > Patch applied with Charles' ACK. > Thanks, Linus. -- Gustavo

Re: [PATCH v2] pinctrl: madera: Fix uninitialized variable bug in madera_mux_set_mux

2018-10-11 Thread Linus Walleij
On Wed, Oct 10, 2018 at 5:13 PM Gustavo A. R. Silva wrote: > There is a potential execution path in which variable *ret* is checked > in an IF statement, and then its value is used to report an error at > line 659 without being properly initialized previously: > > 659 if (ret) > 660 dev_err(p

Re: [PATCH v2] pinctrl: madera: Fix uninitialized variable bug in madera_mux_set_mux

2018-10-10 Thread Charles Keepax
On Wed, Oct 10, 2018 at 05:13:13PM +0200, Gustavo A. R. Silva wrote: > There is a potential execution path in which variable *ret* is checked > in an IF statement, and then its value is used to report an error at > line 659 without being properly initialized previously: > > 659 if (ret) > 660 de

[PATCH v2] pinctrl: madera: Fix uninitialized variable bug in madera_mux_set_mux

2018-10-10 Thread Gustavo A. R. Silva
There is a potential execution path in which variable *ret* is checked in an IF statement, and then its value is used to report an error at line 659 without being properly initialized previously: 659 if (ret) 660 dev_err(priv->dev, "Failed to write to 0x%x (%d)\n", reg, ret); Fix this by init