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
..
cassini.c net: cassini: Fix fall-through warnings for Clang 2021-03-10 12:45:15 -08:00
cassini.h
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
ldmvsw.c
Makefile
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 mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
sunhme.h
sunqe.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
sunqe.h
sunvnet_common.c skb_copy_and_csum_bits(): don't bother with the last argument 2020-08-20 15:45:13 -04:00
sunvnet_common.h netdev: pass the stuck queue to the timeout handler 2019-12-12 21:38:57 -08:00
sunvnet.c