]> git.baikalelectronics.ru Git - kernel.git/commit
NIU: fix incorrect error return, missed in previous revert
authorPaul Jakma <paul@jakma.org>
Fri, 23 Jul 2021 15:13:04 +0000 (16:13 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Jul 2021 16:48:52 +0000 (17:48 +0100)
commit79fe92ea7f0edc2bbf99cc111480d9e2949e7099
tree6206a738f6d33c2f9125dee2513fccef0578e999
parent00cf8392ef2e6f9e0841b83f4d0485081683a135
NIU: fix incorrect error return, missed in previous revert

Commit fca6f6c4e, reverting a73c046, missed out on reverting an incorrect
change to a return value.  The niu_pci_vpd_scan_props(..) == 1 case appears
to be a normal path - treating it as an error and return -EINVAL was
breaking VPD_SCAN and causing the driver to fail to load.

Fix, so my Neptune card works again.

Cc: Kangjie Lu <kjlu@umn.edu>
Cc: Shannon Nelson <shannon.lee.nelson@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable <stable@vger.kernel.org>
Fixes: fca6f6c4 ('Revert "niu: fix missing checks of niu_pci_eeprom_read"')
Signed-off-by: Paul Jakma <paul@jakma.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sun/niu.c