Searched hist:e6e33770 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/net/ethernet/sun/ |
H A D | niu.c | e6e33770 Mon May 03 06:56:50 CDT 2021 Du Cheng <ducheng2@gmail.com> 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>
|