Skip to contentSkip to conversation

phy: bcm-ns-usb2: checking the wrong variable

PATCH In review Dan Carpenter 2 participants 2 messages May 10, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 phy: bcm-ns-usb2: checking the wrong variable

We intended to test "usb2->phy" here instead of "dev".

Fixes d3feb4067335 ('phy: bcm-ns-usb2: new driver for USB 2.0 PHY on Northstar')
drivers/phy/phy-bcm-ns-usb2.c +2 -2
index 95ab6b2..58dff80 100644
@@ -109,8 +109,8 @@ static int bcm_ns_usb2_probe(struct platform_device *pdev)
 	}
 
 	usb2->phy = devm_phy_create(dev, NULL, &ops);
-	if (IS_ERR(dev))
-		return PTR_ERR(dev);
+	if (IS_ERR(usb2->phy))
+		return PTR_ERR(usb2->phy);
 
 	phy_set_drvdata(usb2->phy, usb2);
 	platform_set_drvdata(pdev, usb2);