提交 0eaf228d 编写于 作者: C Claudiu Beznea 提交者: David S. Miller

net: macb: call pm_runtime_put_sync on failure path

Call pm_runtime_put_sync() on failure path of at91ether_open.

Fixes: e6a41c23 ("net: macb: ensure interface is not suspended on at91rm9200")
Signed-off-by: NClaudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f4926d51
......@@ -3837,7 +3837,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) |
......@@ -3850,11 +3850,15 @@ static int at91ether_open(struct net_device *dev)
ret = macb_phylink_connect(lp);
if (ret)
return ret;
goto pm_exit;
netif_start_queue(dev);
return 0;
pm_exit:
pm_runtime_put_sync(&lp->pdev->dev);
return ret;
}
/* Close the interface */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册