* [PATCH net] ibmvnic: Include missing return code checks in reset function
@ 2018-08-30 18:19 Thomas Falcon
2018-09-01 6:16 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Falcon @ 2018-08-30 18:19 UTC (permalink / raw)
To: netdev; +Cc: Thomas Falcon
Check the return codes of these functions and halt reset
in case of failure. The driver will remain in a dormant state
until the next reset event, when device initialization will be
re-attempted.
Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
---
drivers/net/ethernet/ibm/ibmvnic.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index ffe7acb..d834308 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -1841,11 +1841,17 @@ static int do_reset(struct ibmvnic_adapter *adapter,
adapter->map_id = 1;
release_rx_pools(adapter);
release_tx_pools(adapter);
- init_rx_pools(netdev);
- init_tx_pools(netdev);
+ rc = init_rx_pools(netdev);
+ if (rc)
+ return rc;
+ rc = init_tx_pools(netdev);
+ if (rc)
+ return rc;
release_napi(adapter);
- init_napi(adapter);
+ rc = init_napi(adapter);
+ if (rc)
+ return rc;
} else {
rc = reset_tx_pools(adapter);
if (rc)
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] ibmvnic: Include missing return code checks in reset function
2018-08-30 18:19 [PATCH net] ibmvnic: Include missing return code checks in reset function Thomas Falcon
@ 2018-09-01 6:16 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-09-01 6:16 UTC (permalink / raw)
To: tlfalcon; +Cc: netdev
From: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Date: Thu, 30 Aug 2018 13:19:53 -0500
> Check the return codes of these functions and halt reset
> in case of failure. The driver will remain in a dormant state
> until the next reset event, when device initialization will be
> re-attempted.
>
> Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-01 10:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-30 18:19 [PATCH net] ibmvnic: Include missing return code checks in reset function Thomas Falcon
2018-09-01 6:16 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).