Skip to content

Commit f4d8124

Browse files
ffainelligregkh
authored andcommitted
net: fec: Fix unbalanced PM runtime calls
[ Upstream commit a069215cf5985f3aa1bba550264907d6bd05c5f7 ] When unbinding/removing the driver, we will run into the following warnings: [ 259.655198] fec 400d1000.ethernet: 400d1000.ethernet supply phy not found, using dummy regulator [ 259.665065] fec 400d1000.ethernet: Unbalanced pm_runtime_enable! [ 259.672770] fec 400d1000.ethernet (unnamed net_device) (uninitialized): Invalid MAC address: 00:00:00:00:00:00 [ 259.683062] fec 400d1000.ethernet (unnamed net_device) (uninitialized): Using random MAC address: f2:3e:93:b7:29:c1 [ 259.696239] libphy: fec_enet_mii_bus: probed Avoid these warnings by balancing the runtime PM calls during fec_drv_remove(). Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 60aa3ac commit f4d8124

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/ethernet/freescale/fec_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3339,6 +3339,8 @@ fec_drv_remove(struct platform_device *pdev)
33393339
if (fep->reg_phy)
33403340
regulator_disable(fep->reg_phy);
33413341
fec_enet_clk_enable(ndev, false);
3342+
pm_runtime_put(&pdev->dev);
3343+
pm_runtime_disable(&pdev->dev);
33423344
of_node_put(fep->phy_node);
33433345
free_netdev(ndev);
33443346

0 commit comments

Comments
 (0)