Skip to contentSkip to conversation

phy: qualcomm: Use dev_err_probe()

PATCH New [email protected] 1 participant 1 message Mar 23, 2023

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

PATCH 1/1 phy: qualcomm: Use dev_err_probe()

From: Ye Xingchen <[email protected]>

Replace the open-code with dev_err_probe() to simplify the code.

---
 drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c +2 -5
index d3e7d5e1d1b6..190f12247235 100644
@@ -110,11 +110,8 @@ static int ipq4019_usb_phy_probe(struct platform_device *pdev)
 	}
 
 	phy->por_rst = devm_reset_control_get(phy->dev, "por_rst");
-	if (IS_ERR(phy->por_rst)) {
-		if (PTR_ERR(phy->por_rst) != -EPROBE_DEFER)
-			dev_err(dev, "POR reset is missing\n");
-		return PTR_ERR(phy->por_rst);
-	}
+	if (IS_ERR(phy->por_rst))
+		return dev_err_probe(dev, PTR_ERR(phy->por_rst), "POR reset is missing\n");
 
 	phy->srif_rst = devm_reset_control_get_optional(phy->dev, "srif_rst");
 	if (IS_ERR(phy->srif_rst))
Signature · 6 lines
2.25.1

-- 
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy