Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9c65a557 authored by Andrew Lunn's avatar Andrew Lunn Committed by Greg Kroah-Hartman
Browse files

net: dsa: mv88e6xxx: Unregister MDIO bus on error path




[ Upstream commit 3126aeec5313565bfa19e2dd8fd7e3c3390514cb ]

The MDIO busses need to be unregistered before they are freed,
otherwise BUG() is called. Add a call to the unregister code if the
registration fails, since we can have multiple busses, of which some
may correctly register before one fails. This requires moving the code
around a little.

Fixes: a3c53be5 ("net: dsa: mv88e6xxx: Support multiple MDIO busses")
Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Reviewed-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0ef99ba0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment