mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-19 12:00:00 +00:00
net: ethernet: ti: cpsw: correct .ndo_open error path
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. So split error path based on usage_count. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
6faaffb3b1
commit
02caceded0
@ -1423,8 +1423,11 @@ static int cpsw_ndo_open(struct net_device *ndev)
|
||||
return 0;
|
||||
|
||||
err_cleanup:
|
||||
cpdma_ctlr_stop(cpsw->dma);
|
||||
for_each_slave(priv, cpsw_slave_stop, cpsw);
|
||||
if (!cpsw->usage_count) {
|
||||
cpdma_ctlr_stop(cpsw->dma);
|
||||
for_each_slave(priv, cpsw_slave_stop, cpsw);
|
||||
}
|
||||
|
||||
pm_runtime_put_sync(cpsw->dev);
|
||||
netif_carrier_off(priv->ndev);
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user