Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 131ab7a0 authored by Sasha Levin's avatar Sasha Levin Committed by Greg Kroah-Hartman
Browse files

net: macb: call pm_runtime_put_sync on failure path



[ Upstream commit 0eaf228d574bd82a9aed73e3953bfb81721f4227 ]

Call pm_runtime_put_sync() on failure path of at91ether_open.

Fixes: e6a41c23df0d ("net: macb: ensure interface is not suspended on at91rm9200")
Signed-off-by: default avatarClaudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent fefc7580
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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 */