net: phy: Ensure the MDIO bus module is held
This commit adds proper module_{get,put} to prevent the MDIO bus module from being unloaded while the phydev is connected. By doing so, we fix a kernel panic produced when a MDIO driver is removed, but the phydev that relies on it is attached and running. Signed-off-by:Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Reviewed-by:
Florian Fainelli <f.fainelli@gmail.com> Tested-by:
Florian Fainelli <f.fainelli@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
parent
a71e3c37
Please register or sign in to comment