diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2016-08-26 14:35:43 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-08-27 04:49:41 (GMT) |
commit | e19ac1578fd8eb3f7c93f2be2657deb2ccefffd7 (patch) | |
tree | be2c94af1d9338b3fb7bb2c1bd6c947325571040 /drivers/net/ethernet/ti | |
parent | 2a7a3c564466e9d58217200b36c026a52d99aaff (diff) | |
download | linux-e19ac1578fd8eb3f7c93f2be2657deb2ccefffd7.tar.xz |
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: ce52c744574b ("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>
Diffstat (limited to 'drivers/net/ethernet/ti')
-rw-r--r-- | drivers/net/ethernet/ti/cpsw.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 4273e7f..c6cff3d 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -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 */ |