diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2018-06-08 12:05:47 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2018-06-18 07:55:56 +0200 |
commit | 71fd5d07b791b90587f695f048ad82e8d4c1c67e (patch) | |
tree | 130037e0c17deac5a795181ae8f5efc204ffa9b3 /drivers/pinctrl | |
parent | 7f57871f39912978e95db920ddbbfb2304a4bfbf (diff) | |
download | linux-71fd5d07b791b90587f695f048ad82e8d4c1c67e.tar.gz linux-71fd5d07b791b90587f695f048ad82e8d4c1c67e.tar.bz2 linux-71fd5d07b791b90587f695f048ad82e8d4c1c67e.zip |
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: 2242ddfbf4d699b5 ("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>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/actions/pinctrl-owl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/actions/pinctrl-owl.c b/drivers/pinctrl/actions/pinctrl-owl.c index 76243caa08c6..b5c880b50bb3 100644 --- a/drivers/pinctrl/actions/pinctrl-owl.c +++ b/drivers/pinctrl/actions/pinctrl-owl.c @@ -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]; |