mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
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>
|
||
|---|---|---|
| .. | ||
| cassini.c | ||
| cassini.h | ||
| Kconfig | ||
| ldmvsw.c | ||
| Makefile | ||
| niu.c | ||
| niu.h | ||
| sunbmac.c | ||
| sunbmac.h | ||
| sungem.c | ||
| sungem.h | ||
| sunhme.c | ||
| sunhme.h | ||
| sunqe.c | ||
| sunqe.h | ||
| sunvnet_common.c | ||
| sunvnet_common.h | ||
| sunvnet.c | ||