[PATCH 2/2] tools/gpio: Add missing initialization of device_name

From: Geert Uytterhoeven
Date: Fri Mar 25 2016 - 08:36:37 EST


lsgpio.c: In function âmainâ:
lsgpio.c:166:7: warning: âdevice_nameâ may be used uninitialized in this functio
n [-Wmaybe-uninitialized]
ret = list_device(device_name);
^

Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
---
tools/gpio/lsgpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/gpio/lsgpio.c b/tools/gpio/lsgpio.c
index 1124da3759424fe6..eb3f56efd2158b4c 100644
--- a/tools/gpio/lsgpio.c
+++ b/tools/gpio/lsgpio.c
@@ -147,7 +147,7 @@ void print_usage(void)

int main(int argc, char **argv)
{
- const char *device_name;
+ const char *device_name = NULL;
int ret;
int c;

--
1.9.1