1
0
Fork 0

net: macb: call pm_runtime_put_sync on failure path

[ Upstream commit 0eaf228d57 ]

Call pm_runtime_put_sync() on failure path of at91ether_open.

Fixes: e6a41c23df ("net: macb: ensure interface is not suspended on at91rm9200")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
5.4-rM2-2.2.x-imx-squashed
Sasha Levin 2020-07-17 11:05:03 -04:00 committed by Greg Kroah-Hartman
parent fefc7580af
commit 131ab7a0cd
1 changed files with 5 additions and 1 deletions

View File

@ -3708,7 +3708,7 @@ static int at91ether_open(struct net_device *dev)
ret = at91ether_start(dev);
if (ret)
return ret;
goto pm_exit;
/* Enable MAC interrupts */
macb_writel(lp, IER, MACB_BIT(RCOMP) |
@ -3725,6 +3725,10 @@ static int at91ether_open(struct net_device *dev)
netif_start_queue(dev);
return 0;
pm_exit:
pm_runtime_put_sync(&lp->pdev->dev);
return ret;
}
/* Close the interface */