diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c b/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c
index 9283af6072aa54568da2ac6264520ea1b2eb9867..1ba05914eadff667fcc09c24aced5ecba27a93e9 100644
--- a/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c
+++ b/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c
@@ -267,7 +267,7 @@ static int b53_phy_probe(struct phy_device *phydev)
 	mutex_init(&dev.reg_mutex);
 
 	ret = b53_switch_detect(&dev);
-	if (!ret)
+	if (ret)
 		return ret;
 
 	if (is5325(&dev) || is5365(&dev))