diff mbox

[-next] net: ethernet: ti: cpsw: fix error return code in cpsw_set_channels()

Message ID 1472222143-3604-1-git-send-email-weiyj.lk@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wei Yongjun Aug. 26, 2016, 2:35 p.m. UTC
From: Wei Yongjun <weiyongjun1@huawei.com>

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>
---
 drivers/net/ethernet/ti/cpsw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller Aug. 27, 2016, 4:50 a.m. UTC | #1
From: Wei Yongjun <weiyj.lk@gmail.com>
Date: Fri, 26 Aug 2016 14:35:43 +0000

> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> 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>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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