linux/drivers/pinctrl/cirrus
Gustavo A. R. Silva 4fe81669df pinctrl: madera: Fix uninitialized variable bug in madera_mux_set_mux
There is a potential execution path in which variable *ret* is checked
in an IF statement, and then its value is used to report an error at
line 659 without being properly initialized previously:

659 if (ret)
660	dev_err(priv->dev, "Failed to write to 0x%x (%d)\n", reg, ret);

Fix this by initializing variable *ret* to 0 in order to
avoid unpredictable or unintended results.

Addresses-Coverity-ID: 1471969 ("Uninitialized scalar variable")
Fixes: 218d72a77b ("pinctrl: madera: Add driver for Cirrus Logic Madera codecs")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-10-12 11:14:38 +02:00
..
Kconfig pinctrl: madera: Add driver for Cirrus Logic Madera codecs 2018-06-05 11:15:23 +01:00
Makefile pinctrl: madera: Add driver for Cirrus Logic Madera codecs 2018-06-05 11:15:23 +01:00
pinctrl-cs47l35.c pinctrl: madera: Add driver for Cirrus Logic Madera codecs 2018-06-05 11:15:23 +01:00
pinctrl-cs47l85.c pinctrl: madera: Add driver for Cirrus Logic Madera codecs 2018-06-05 11:15:23 +01:00
pinctrl-cs47l90.c pinctrl: madera: Add driver for Cirrus Logic Madera codecs 2018-06-05 11:15:23 +01:00
pinctrl-madera-core.c pinctrl: madera: Fix uninitialized variable bug in madera_mux_set_mux 2018-10-12 11:14:38 +02:00
pinctrl-madera.h pinctrl: madera: Add driver for Cirrus Logic Madera codecs 2018-06-05 11:15:23 +01:00