diff mbox series

[net-next] net: ethernet: ti: cpsw: correct .ndo_open error path

Message ID 20190528123352.21505-1-ivan.khoronzhuk@linaro.org
State New
Headers show
Series [net-next] net: ethernet: ti: cpsw: correct .ndo_open error path | expand

Commit Message

Ivan Khoronzhuk May 28, 2019, 12:33 p.m. UTC
It's found while review and probably never happens, but real number
of queues is set per device, and error path should be per device.
Also correct label name for shared error path.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>

---
 drivers/net/ethernet/ti/cpsw.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

-- 
2.17.1

Comments

Ivan Khoronzhuk May 28, 2019, 5:48 p.m. UTC | #1
Please ignore this version, I've sent version 2 that do the same but is more
adjustable for later on changes and based on usage counter.

-- 
Regards,
Ivan Khoronzhuk
diff mbox series

Patch

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 634fc484a0b3..473d25ed59e3 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1399,7 +1399,7 @@  static int cpsw_ndo_open(struct net_device *ndev)
 
 		ret = cpsw_fill_rx_channels(priv);
 		if (ret < 0)
-			goto err_cleanup;
+			goto err_shared_cleanup;
 
 		if (cpts_register(cpsw->cpts))
 			dev_err(priv->dev, "error registering cpts device\n");
@@ -1422,9 +1422,10 @@  static int cpsw_ndo_open(struct net_device *ndev)
 
 	return 0;
 
-err_cleanup:
+err_shared_cleanup:
 	cpdma_ctlr_stop(cpsw->dma);
 	for_each_slave(priv, cpsw_slave_stop, cpsw);
+err_cleanup:
 	pm_runtime_put_sync(cpsw->dev);
 	netif_carrier_off(priv->ndev);
 	return ret;