Skip to contentSkip to conversation

net: ethernet: ti: cpsw: fix error return code in cpsw_set_channels()

PATCH Applied Wei Yongjun 2 participants 2 messages Aug 26, 2016 – Aug 27, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: ethernet: ti: cpsw: fix error return code in cpsw_set_channels()

From: Wei Yongjun <[email protected]>

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")
---
 drivers/net/ethernet/ti/cpsw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/ti/cpsw.c +2 -1
index 4273e7f..c6cff3d 100644
@@ -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 */
maintainer Applied
#1 lore raw

From: Wei Yongjun <[email protected]>
Date: Fri, 26 Aug 2016 14:35:43 +0000

Quoted 7 lines

From: Wei Yongjun <[email protected]>

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")

Applied.