amd-xgbe: Fix error return code in xgbe_probe()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Wed, 23 Jul 2014 00:59:40 +0000 (08:59 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Jul 2014 21:54:12 +0000 (14:54 -0700)
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>
drivers/net/ethernet/amd/xgbe/xgbe-main.c

index c83584a26713e6633675a9e82a9ab251d9dce1c0..5a1891faba8a1f9df9090c3c1064af74cb5c2136 100644 (file)
@@ -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;
        }