net: netxen: fix a missing check and an uninitialized use
authorKangjie Lu <kjlu@umn.edu>
Fri, 21 Dec 2018 06:22:32 +0000 (00:22 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Jan 2019 09:01:01 +0000 (10:01 +0100)
commit29b7def0ffb1c9acc043a5ca4b9fb212c2d0687d
tree5052f3650f50986a27fbf5ae21e53c86f34db3ae
parentdd707bdce260c0b9adf99e9a3a77a21ca3ead2eb
net: netxen: fix a missing check and an uninitialized use

[ Upstream commit d134e486e831defd26130770181f01dfc6195f7d ]

When netxen_rom_fast_read() fails, "bios" is left uninitialized and may
contain random value, thus should not be used.

The fix ensures that if netxen_rom_fast_read() fails, we return "-EIO".

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c