Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 332cfc82 authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller
Browse files

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 474ea9ca
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -339,7 +339,8 @@ static int xgbe_probe(struct platform_device *pdev)
	/* Calculate the number of Tx and Rx rings to be created */
	/* Calculate the number of Tx and Rx rings to be created */
	pdata->tx_ring_count = min_t(unsigned int, num_online_cpus(),
	pdata->tx_ring_count = min_t(unsigned int, num_online_cpus(),
				     pdata->hw_feat.tx_ch_cnt);
				     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");
		dev_err(dev, "error setting real tx queue count\n");
		goto err_io;
		goto err_io;
	}
	}