Commit f3ea3119 authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller

bnxt_en: initialize rc to zero to avoid returning garbage

rc is not initialized so it can contain garbage if it is not
set by the call to bnxt_read_sfp_module_eeprom_info. Ensure
garbage is not returned by initializing rc to 0.
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7d32eb87
...@@ -1591,7 +1591,7 @@ static int bnxt_get_module_eeprom(struct net_device *dev, ...@@ -1591,7 +1591,7 @@ static int bnxt_get_module_eeprom(struct net_device *dev,
{ {
struct bnxt *bp = netdev_priv(dev); struct bnxt *bp = netdev_priv(dev);
u16 start = eeprom->offset, length = eeprom->len; u16 start = eeprom->offset, length = eeprom->len;
int rc; int rc = 0;
memset(data, 0, eeprom->len); memset(data, 0, eeprom->len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment