Skip to content

Commit 15bbf8b

Browse files
pjakmadavem330
authored andcommitted
NIU: fix incorrect error return, missed in previous revert
Commit 7930742, reverting 26fd962, 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 <[email protected]> Cc: Shannon Nelson <[email protected]> Cc: David S. Miller <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: stable <[email protected]> Fixes: 7930742 ('Revert "niu: fix missing checks of niu_pci_eeprom_read"') Signed-off-by: Paul Jakma <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 52f3456 commit 15bbf8b

File tree

1 file changed

+2
-1
lines changed
  • drivers/net/ethernet/sun

1 file changed

+2
-1
lines changed

drivers/net/ethernet/sun/niu.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8191,8 +8191,9 @@ static int niu_pci_vpd_fetch(struct niu *np, u32 start)
81918191
err = niu_pci_vpd_scan_props(np, here, end);
81928192
if (err < 0)
81938193
return err;
8194+
/* ret == 1 is not an error */
81948195
if (err == 1)
8195-
return -EINVAL;
8196+
return 0;
81968197
}
81978198
return 0;
81988199
}

0 commit comments

Comments
 (0)