]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Fix an error handling path in 'bnxt_get_module_eeprom()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 21 Nov 2017 19:46:49 +0000 (20:46 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Nov 2017 15:55:22 +0000 (10:55 -0500)
commit280208afebf52cc50d2b0b6c17f3a926c1afa959
treec1599f974fdd5a4951372391da0105526489246d
parent68cfbba1fc1836ddaff6946ae45d4f398e2e7982
bnxt_en: Fix an error handling path in 'bnxt_get_module_eeprom()'

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>
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c