net/cxgbe/base: initialize variable before reading EEPROM
authorEmmanuel Roullit <emmanuel.roullit@gmail.com>
Tue, 24 Jan 2017 20:48:57 +0000 (21:48 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 30 Jan 2017 21:18:26 +0000 (22:18 +0100)
commitdd995b23dfc22a28edc565ce6163a5c98068d302
tree27f80afb9692a6cf231f9f41bcef913a9db6954a
parent83277a7ccca5e1551b4bfdec3866961d9af09356
net/cxgbe/base: initialize variable before reading EEPROM

data value could have been garbage if VPD access timed out for VPD read
request could not been issued.

Found with clang static analysis:
drivers/net/cxgbe/base/t4_hw.c:1577:22:
warning: The left operand of '&' is a garbage value
        } while ((stats_reg & 0x1) && --max_poll);
                  ~~~~~~~~~ ^

Fixes: fe0bd9ee5da3 ("net/cxgbe: support EEPROM access")
Cc: stable@dpdk.org
Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
drivers/net/cxgbe/base/t4_hw.c