diff --git a/drivers/phy/starfive/phy-jh7110-pcie.c b/drivers/phy/starfive/phy-jh7110-pcie.c
index cbe79c1f59d33c58102530bbefcbb465a614e973..734c8e007727734e7d6db938fc8217808cab6e0b 100644
--- a/drivers/phy/starfive/phy-jh7110-pcie.c
+++ b/drivers/phy/starfive/phy-jh7110-pcie.c
@@ -151,7 +151,7 @@ static int jh7110_pcie_phy_probe(struct platform_device *pdev)
 
 	phy->phy = devm_phy_create(dev, NULL, &jh7110_pcie_phy_ops);
 	if (IS_ERR(phy->phy))
-		return dev_err_probe(dev, PTR_ERR(phy->regs),
+		return dev_err_probe(dev, PTR_ERR(phy->phy),
 				     "Failed to map phy base\n");
 
 	phy->sys_syscon =