Skip to content

Commit

Permalink
net: ethernet: ti: cpsw: fix error return code in cpsw_set_channels()
Browse files Browse the repository at this point in the history
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: ce52c74 ("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>
  • Loading branch information
Wei Yongjun authored and David S. Miller committed Aug 27, 2016
1 parent 2a7a3c5 commit e19ac15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/ti/cpsw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit e19ac15

Please sign in to comment.