Skip to contentSkip to conversation

ARM: mxc: iomux-v1: Fix build warning

PATCH New Fabio Estevam 2 participants 2 messages Jun 22, 2011 – Jun 23, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: mxc: iomux-v1: Fix build warning

Fix the following warning:

CC arch/arm/plat-mxc/iomux-v1.o
arch/arm/plat-mxc/iomux-v1.c: In function 'mxc_gpio_setup_multiple_pins':
arch/arm/plat-mxc/iomux-v1.c:160: warning: 'ret' may be used uninitialized in this function arch/arm/plat-mxc/iomux-v1.c:160: note: 'ret' was declared here

---
 arch/arm/plat-mxc/iomux-v1.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-mxc/iomux-v1.c +1 -1
index d76f3ac..1f73963 100644
@@ -157,7 +157,7 @@ EXPORT_SYMBOL(mxc_gpio_mode);
 static int imx_iomuxv1_setup_multiple(const int *list, unsigned count)
 {
 	size_t i;
-	int ret;
+	int ret = 0;
 
 	for (i = 0; i < count; ++i) {
 		ret = mxc_gpio_mode(list[i]);
Signature · 1 line
1.6.0.4
maintainer Applied
#1 lore raw

PATCH 1/1 ARM: mxc: iomux-v1: Fix build warning

Applied

Quoted 30 lines · Fabio Estevam

Fix the following warning:

CC arch/arm/plat-mxc/iomux-v1.o
arch/arm/plat-mxc/iomux-v1.c: In function 'mxc_gpio_setup_multiple_pins':
arch/arm/plat-mxc/iomux-v1.c:160: warning: 'ret' may be used uninitialized in this function arch/arm/plat-mxc/iomux-v1.c:160: note: 'ret' was declared here

---
 arch/arm/plat-mxc/iomux-v1.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-mxc/iomux-v1.c +1 -1
index d76f3ac..1f73963 100644
@@ -157,7 +157,7 @@ EXPORT_SYMBOL(mxc_gpio_mode);
 static int imx_iomuxv1_setup_multiple(const int *list, unsigned count)
 {
 	size_t i;
-	int ret;
+	int ret = 0;
 
 	for (i = 0; i < count; ++i) {
 		ret = mxc_gpio_mode(list[i]);
Signature · 1 line
1.6.0.4
Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |