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: ce52c74457 ("net: ethernet: ti: cpsw: add ethtool channels support")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Wei Yongjun 2016-08-26 14:35:43 +00:00 committed by David S. Miller
parent 2a7a3c5644
commit e19ac1578f
1 changed files with 2 additions and 1 deletions

View File

@ -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 */