Skip to content
Commit e1d027dd authored by Christophe JAILLET's avatar Christophe JAILLET Committed by David S. Miller
Browse files

net: mdio: octeon: Fix some double free issues



'bus->mii_bus' has been allocated with 'devm_mdiobus_alloc_size()' in the
probe function. So it must not be freed explicitly or there will be a
double free.

Remove the incorrect 'mdiobus_free' in the error handling path of the
probe function and in remove function.

Suggested-By: default avatarAndrew Lunn <andrew@lunn.ch>
Fixes: 35d2aeac ("phy: mdio-octeon: Use devm_mdiobus_alloc_size()")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a93a0a15
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