summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/mdio_bus.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-05-27 18:22:11 +0200
committerJakub Kicinski <kuba@kernel.org>2021-05-27 18:55:10 +0200
commit5ada57a9a6b0be0e6dfcbd4afa519b0347fd5649 (patch)
treef82f466df9272bb0c385320b25adc51c45309f84 /drivers/net/phy/mdio_bus.c
parentMerge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/ne... (diff)
parentMerge tag 'net-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/net... (diff)
downloadlinux-5ada57a9a6b0be0e6dfcbd4afa519b0347fd5649.tar.xz
linux-5ada57a9a6b0be0e6dfcbd4afa519b0347fd5649.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
cdc-wdm: s/kill_urbs/poison_urbs/ to fix build Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/phy/mdio_bus.c')
-rw-r--r--drivers/net/phy/mdio_bus.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index dadf75ff3ab9..6045ad3def12 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -607,7 +607,8 @@ void mdiobus_unregister(struct mii_bus *bus)
struct mdio_device *mdiodev;
int i;
- BUG_ON(bus->state != MDIOBUS_REGISTERED);
+ if (WARN_ON_ONCE(bus->state != MDIOBUS_REGISTERED))
+ return;
bus->state = MDIOBUS_UNREGISTERED;
for (i = 0; i < PHY_MAX_ADDR; i++) {