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 <weiyongj...@huawei.com>
---
 drivers/net/ethernet/broadcom/genet/bcmmii.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/genet/bcmmii.c 
b/drivers/net/ethernet/broadcom/genet/bcmmii.c
index ba3fcfd..5333274 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmmii.c
+++ b/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_node_put(priv->phy_dn);
        platform_device_unregister(priv->mii_pdev);
-       platform_device_put(priv->mii_pdev);
 }

Reply via email to