Skip to content

Commit 71fd5d0

Browse files
geertuLinus Walleij
authored andcommitted
pinctrl: actions: Fix uninitialized error in owl_pin_config_set()
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: 2242ddf ("pinctrl: actions: Add Actions S900 pinctrl driver") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent 7f57871 commit 71fd5d0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/pinctrl/actions/pinctrl-owl.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ static int owl_pin_config_set(struct pinctrl_dev *pctrldev,
333333
unsigned long flags;
334334
unsigned int param;
335335
u32 reg, bit, width, arg;
336-
int ret, i;
336+
int ret = 0, i;
337337

338338
info = &pctrl->soc->padinfo[pin];
339339

0 commit comments

Comments
 (0)