Browse Source

net: bcmgenet: Avoid calling platform_device_put() twice in bcmgenet_mii_exit()

Remove platform_device_put() call after platform_device_unregister()
from function bcmgenet_mii_exit(), otherwise, we will call
platform_device_put() twice.

Fixes: 9a4e79697009 ("net: bcmgenet: utilize generic Broadcom UniMAC MDIO controller driver")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Doug Berger <opendmb@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun 7 years ago
parent
commit
aa7365e19f
1 changed files with 0 additions and 1 deletions
  1. 0 1
      drivers/net/ethernet/broadcom/genet/bcmmii.c

+ 0 - 1
drivers/net/ethernet/broadcom/genet/bcmmii.c

@@ -571,5 +571,4 @@ void bcmgenet_mii_exit(struct net_device *dev)
 		of_phy_deregister_fixed_link(dn);
 		of_phy_deregister_fixed_link(dn);
 	of_node_put(priv->phy_dn);
 	of_node_put(priv->phy_dn);
 	platform_device_unregister(priv->mii_pdev);
 	platform_device_unregister(priv->mii_pdev);
-	platform_device_put(priv->mii_pdev);
 }
 }