mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 02:24:24 +02:00
net: ethernet: renesas: rswitch: Fix error path in renesas_eth_sw_probe()
If rswitch_init() returns non-zero and this driver is re-probed,
the following error happens:
renesas_eth_sw e6880000.ethernet: Unbalanced pm_runtime_enable!
So, fix error path in renesas_eth_sw_probe().
Fixes: 3590918b5d ("net: ethernet: renesas: Add support for "Ethernet Switch"")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
81852018f2
commit
8e6a8d7a3d
|
|
@ -1786,6 +1786,11 @@ static int renesas_eth_sw_probe(struct platform_device *pdev)
|
|||
pm_runtime_get_sync(&pdev->dev);
|
||||
|
||||
ret = rswitch_init(priv);
|
||||
if (ret < 0) {
|
||||
pm_runtime_put(&pdev->dev);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
device_set_wakeup_capable(&pdev->dev, 1);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user