]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
net: ethernet: ti: cpsw: fix error return code in cpsw_set_channels()
authorWei Yongjun <weiyongjun1@huawei.com>
Fri, 26 Aug 2016 14:35:43 +0000 (14:35 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 27 Aug 2016 04:49:41 +0000 (21:49 -0700)
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>
drivers/net/ethernet/ti/cpsw.c

index 4273e7f9b4aaf363900cd07e508ac116ad86165d..c6cff3d2ff050c33c65416a1c8e6c06c44358936 100644 (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 */