Re: [PATCH] pinctrl: actions: Fix uninitialized error in owl_pin_config_set()

From: Linus Walleij
Date: Thu Jun 14 2018 - 04:35:40 EST


On Fri, Jun 8, 2018 at 12:05 PM, Geert Uytterhoeven
<geert@xxxxxxxxxxxxxx> wrote:

> With gcc 4.1.2:
>
> drivers/pinctrl/actions/pinctrl-owl.c: In function âowl_pin_config_setâ:
> drivers/pinctrl/actions/pinctrl-owl.c:336: warning: âretâ may be used uninitialized in this function
>
> Indeed, if num_configs is zero, the uninitialized value will be returned
> as an error code.
>
> Fix this by preinitializing it to zero.
>
> Fixes: 2242ddfbf4d699b5 ("pinctrl: actions: Add Actions S900 pinctrl driver")
> Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>

Patch applied with Manivannan's ACK.

Yours,
Linus Walleij