amd-xgbe: Check xgbe_init() return code
[ Upstream commit 738f7f647371ff4cfc9646c99dba5b58ad142db3 ] 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: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
dac30e3dbd
commit
3d2cbbcbde
2 changed files with 6 additions and 2 deletions
|
@ -2732,8 +2732,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
|
||||||
|
|
|
@ -877,7 +877,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;
|
||||||
|
|
||||||
ret = phy_if->phy_start(pdata);
|
ret = phy_if->phy_start(pdata);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
Loading…
Add table
Reference in a new issue