Commit aa7365e1 authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller

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: 9a4e7969 ("net: bcmgenet: utilize generic Broadcom UniMAC MDIO controller driver")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Acked-by: default avatarDoug Berger <opendmb@gmail.com>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 985b6e6d
...@@ -571,5 +571,4 @@ void bcmgenet_mii_exit(struct net_device *dev) ...@@ -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);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment