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: 2242ddfbf4
("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>
This commit is contained in:
Родитель
7f57871f39
Коммит
71fd5d07b7
|
@ -333,7 +333,7 @@ static int owl_pin_config_set(struct pinctrl_dev *pctrldev,
|
|||
unsigned long flags;
|
||||
unsigned int param;
|
||||
u32 reg, bit, width, arg;
|
||||
int ret, i;
|
||||
int ret = 0, i;
|
||||
|
||||
info = &pctrl->soc->padinfo[pin];
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче