提交 e19ac157 编写于 作者: W Wei Yongjun 提交者: David S. Miller

net: ethernet: ti: cpsw: fix error return code in cpsw_set_channels()

Fix to return a negative error code from the cpsw_fill_rx_channels()
error handling case instead of 0, as done elsewhere in this function.

Fixes: ce52c744 ("net: ethernet: ti: cpsw: add ethtool channels support")
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 2a7a3c56
......@@ -2217,7 +2217,8 @@ static int cpsw_set_channels(struct net_device *ndev,
}
if (cpsw_common_res_usage_state(cpsw)) {
if (cpsw_fill_rx_channels(priv))
ret = cpsw_fill_rx_channels(priv);
if (ret)
goto err;
/* After this receive is started */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册