mirror-linux/drivers/net/ethernet/sun
Du Cheng e6e337708c ethernet: sun: niu: fix missing checks of niu_pci_eeprom_read()
niu_pci_eeprom_read() may fail, so add checks to its return value and
propagate the error up the callstack.

An examination of the callstack up to niu_pci_eeprom_read shows that:

niu_pci_eeprom_read() // returns int
    niu_pci_vpd_scan_props() // returns int
        niu_pci_vpd_fetch() // returns *void*
            niu_get_invariants() // returns int

since niu_pci_vpd_fetch() returns void which breaks the bubbling up,
change its return type to int so that error is propagated upwards.

Signed-off-by: Du Cheng <ducheng2@gmail.com>
Cc: Shannon Nelson <shannon.lee.nelson@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210503115736.2104747-24-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-13 17:33:24 +02:00
..
Kconfig
Makefile
cassini.c net: cassini: Fix fall-through warnings for Clang 2021-03-10 12:45:15 -08:00
cassini.h
ldmvsw.c
niu.c ethernet: sun: niu: fix missing checks of niu_pci_eeprom_read() 2021-05-13 17:33:24 +02:00
niu.h
sunbmac.c net: sunbmac: Replace in_interrupt() usage 2020-09-29 14:02:54 -07:00
sunbmac.h
sungem.c Fix a typo 2021-03-18 19:46:19 -07:00
sungem.h
sunhme.c
sunhme.h
sunqe.c
sunqe.h
sunvnet.c
sunvnet_common.c
sunvnet_common.h