ionic: clear compiler warning on hb use before set
authorShannon Nelson <snelson@pensando.io>
Tue, 7 Jan 2020 03:43:49 +0000 (19:43 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Jan 2020 21:05:06 +0000 (13:05 -0800)
Build checks have pointed out that 'hb' can theoretically
be used before set, so let's initialize it and get rid
of the compiler complaint.

Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/pensando/ionic/ionic_main.c

index 837b85f..a8e3fb7 100644 (file)
@@ -330,9 +330,9 @@ int ionic_dev_cmd_wait(struct ionic *ionic, unsigned long max_seconds)
        unsigned long max_wait;
        unsigned long duration;
        int opcode;
+       int hb = 0;
        int done;
        int err;
-       int hb;
 
        WARN_ON(in_interrupt());