diff mbox

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

Message ID 1458909390-2686-3-git-send-email-geert+renesas@glider.be
State New
Headers show

Commit Message

Geert Uytterhoeven March 25, 2016, 12:36 p.m. UTC
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@glider.be>
---
 tools/gpio/lsgpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Linus Walleij March 31, 2016, 9:51 a.m. UTC | #1
On Fri, Mar 25, 2016 at 1:36 PM, Geert Uytterhoeven
<geert+renesas@glider.be> wrote:

> 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@glider.be>

Patch applied.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;