Skip to content

Commit 6d65923

Browse files
nfontdavem330
authored andcommitted
ibmvnic: Correct return code checking for ibmvnic_init during probe
The update to ibmvnic_init to allow an EAGAIN return code broke the calling of ibmvnic_init from ibmvnic_probe. The code now will return from this point in the probe routine if anything other than EAGAIN is returned. The check should be to see if rc is non-zero and not equal to EAGAIN. Without this fix, the vNIC driver can return 0 (success) from its probe routine due to ibmvnic_init returning zero, but before completing the probe process and registering with the netdev layer. Fixes: 6a2fb0e (ibmvnic: driver initialization for kdump/kexec) Signed-off-by: Nathan Fontenot <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9995bac commit 6d65923

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/ibm/ibmvnic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3726,7 +3726,7 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id)
37263726

37273727
do {
37283728
rc = ibmvnic_init(adapter);
3729-
if (rc != EAGAIN) {
3729+
if (rc && rc != EAGAIN) {
37303730
free_netdev(netdev);
37313731
return rc;
37323732
}

0 commit comments

Comments
 (0)