diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2014-07-23 00:59:40 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-23 21:54:12 (GMT) |
commit | 332cfc823d182d43bfcc80d1ebee7ab79e06ccf3 (patch) | |
tree | f3024c505874a4de563b07a10f8cadbc61a23305 /drivers/net/ethernet/amd/xgbe | |
parent | 474ea9cafc459976827a477f2c30eaf6313cb7c1 (diff) | |
download | linux-332cfc823d182d43bfcc80d1ebee7ab79e06ccf3.tar.xz |
amd-xgbe: Fix error return code in xgbe_probe()
Fix to return a negative error code from the setting real tx queue
count error handling case instead of 0.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amd/xgbe')
-rw-r--r-- | drivers/net/ethernet/amd/xgbe/xgbe-main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-main.c b/drivers/net/ethernet/amd/xgbe/xgbe-main.c index c83584a..5a1891f 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-main.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-main.c @@ -339,7 +339,8 @@ static int xgbe_probe(struct platform_device *pdev) /* Calculate the number of Tx and Rx rings to be created */ pdata->tx_ring_count = min_t(unsigned int, num_online_cpus(), pdata->hw_feat.tx_ch_cnt); - if (netif_set_real_num_tx_queues(netdev, pdata->tx_ring_count)) { + ret = netif_set_real_num_tx_queues(netdev, pdata->tx_ring_count); + if (ret) { dev_err(dev, "error setting real tx queue count\n"); goto err_io; } |