Commit 738f7f64 authored by Lendacky, Thomas's avatar Lendacky, Thomas Committed by David S. Miller

amd-xgbe: Check xgbe_init() return code

The xgbe_init() routine returns a return code indicating success or
failure, but the return code is not checked. Add code to xgbe_init()
to issue a message when failures are seen and add code to check the
xgbe_init() return code.
Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4eccbfc3
...@@ -3407,8 +3407,10 @@ static int xgbe_init(struct xgbe_prv_data *pdata) ...@@ -3407,8 +3407,10 @@ static int xgbe_init(struct xgbe_prv_data *pdata)
/* Flush Tx queues */ /* Flush Tx queues */
ret = xgbe_flush_tx_queues(pdata); ret = xgbe_flush_tx_queues(pdata);
if (ret) if (ret) {
netdev_err(pdata->netdev, "error flushing TX queues\n");
return ret; return ret;
}
/* /*
* Initialize DMA related features * Initialize DMA related features
......
...@@ -1070,7 +1070,9 @@ static int xgbe_start(struct xgbe_prv_data *pdata) ...@@ -1070,7 +1070,9 @@ static int xgbe_start(struct xgbe_prv_data *pdata)
DBGPR("-->xgbe_start\n"); DBGPR("-->xgbe_start\n");
hw_if->init(pdata); ret = hw_if->init(pdata);
if (ret)
return ret;
xgbe_napi_enable(pdata, 1); xgbe_napi_enable(pdata, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment