linux/drivers/pinctrl/sunxi
Arnd Bergmann d8a2221273 pinctrl: sunxi: fix theoretical uninitialized variable access
gcc warns about a  way that it could use an uninitialized variable:

drivers/pinctrl/sunxi/pinctrl-sunxi.c: In function 'sunxi_pinctrl_init':
drivers/pinctrl/sunxi/pinctrl-sunxi.c:1191:8: error: 'best_div' may be used uninitialized in this function [-Werror=maybe-uninitialized]

This cannot really happen except if 'freq' is UINT_MAX and 'clock' is
zero, and both of these are forbidden. To shut up the warning anyway,
this changes the logic to initialize the return code to the first
divider value before looking at the others.

Fixes: 7c926492d3 ("pinctrl: sunxi: Add support for interrupt debouncing")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-11-16 20:53:48 +01:00
..
Kconfig pinctrl: sunxi: Add GR8 controller support 2016-09-07 21:15:49 +02:00
Makefile pinctrl: sunxi: Add GR8 controller support 2016-09-07 21:15:49 +02:00
pinctrl-gr8.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun4i-a10.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun5i-a10s.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun5i-a13.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun6i-a31-r.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun6i-a31.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun6i-a31s.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun7i-a20.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun8i-a23-r.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun8i-a23.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun8i-a33.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun8i-a83t.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun8i-h3-r.c pinctrl: sunxi: Add H3 R_PIO controller support 2016-02-11 14:29:24 +01:00
pinctrl-sun8i-h3.c pinctrl: sunxi: Remove unsupported PWM channel pinmux in H3 2016-09-08 01:08:23 +02:00
pinctrl-sun9i-a80-r.c pinctrl: sunxi: make A80 explicitly non-modular 2016-03-09 10:27:25 +07:00
pinctrl-sun9i-a80.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun50i-a64.c drivers: pinctrl: add driver for Allwinner A64 SoC 2016-03-11 22:46:27 +07:00
pinctrl-sunxi.c pinctrl: sunxi: fix theoretical uninitialized variable access 2016-11-16 20:53:48 +01:00
pinctrl-sunxi.h pinctrl: sunxi: Add support for interrupt debouncing 2016-11-15 10:23:02 +01:00