summaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/dsa_loop.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-09-06 05:03:35 +0200
committerDavid S. Miller <davem@davemloft.net>2017-09-06 05:03:35 +0200
commit18fb0b46d555dc42f52f69428dcd52f133877078 (patch)
tree7696741f50fb1a373aee3601074e30f6e366e425 /drivers/net/dsa/dsa_loop.c
parentMerge branch 'xgene-Misc-bug-fixes' (diff)
parentnet: dsa: loop: Do not unregister invalid fixed PHY (diff)
downloadlinux-18fb0b46d555dc42f52f69428dcd52f133877078.tar.xz
linux-18fb0b46d555dc42f52f69428dcd52f133877078.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/net/dsa/dsa_loop.c')
-rw-r--r--drivers/net/dsa/dsa_loop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/dsa_loop.c b/drivers/net/dsa/dsa_loop.c
index 7819a9fe8321..d55051abf4ed 100644
--- a/drivers/net/dsa/dsa_loop.c
+++ b/drivers/net/dsa/dsa_loop.c
@@ -352,7 +352,7 @@ static void __exit dsa_loop_exit(void)
mdio_driver_unregister(&dsa_loop_drv);
for (i = 0; i < NUM_FIXED_PHYS; i++)
- if (phydevs[i])
+ if (!IS_ERR(phydevs[i]))
fixed_phy_unregister(phydevs[i]);
}
module_exit(dsa_loop_exit);