bnxt_en: Fix an error handling path in 'bnxt_get_module_eeprom()'
commit98ae1ca7534e47508719ee54657f01df55437f62
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 21 Nov 2017 19:46:49 +0000 (21 20:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Feb 2018 16:05:39 +0000 (3 17:05 +0100)
tree3876dc9b0b1183a984962a39e34ef87f32939825
parentd5a746cf47975a30a8ffaa799db93881512530e8
bnxt_en: Fix an error handling path in 'bnxt_get_module_eeprom()'

[ Upstream commit dea521a2b9f96e905fa2bb2f95e23ec00c2ec436 ]

Error code returned by 'bnxt_read_sfp_module_eeprom_info()' is handled a
few lines above when reading the A0 portion of the EEPROM.
The same should be done when reading the A2 portion of the EEPROM.

In order to correctly propagate an error, update 'rc' in this 2nd call as
well, otherwise 0 (success) is returned.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c