Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab5ec33b authored by Thomas Falcon's avatar Thomas Falcon Committed by David S. Miller
Browse files

ibmvnic: Handle error case when setting link state



If setting the link state is not successful, print a warning
with the resulting return code and return it to be handled
by the caller.

Signed-off-by: default avatarThomas Falcon <tlfalcon@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 17c87058
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -929,6 +929,10 @@ static int set_link_state(struct ibmvnic_adapter *adapter, u8 link_state)
			/* Partuial success, delay and re-send */
			/* Partuial success, delay and re-send */
			mdelay(1000);
			mdelay(1000);
			resend = true;
			resend = true;
		} else if (adapter->init_done_rc) {
			netdev_warn(netdev, "Unable to set link state, rc=%d\n",
				    adapter->init_done_rc);
			return adapter->init_done_rc;
		}
		}
	} while (resend);
	} while (resend);