summaryrefslogtreecommitdiffstats
path: root/drivers/phy/phy-stm32-usbphyc.c
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2024-02-19 18:26:59 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-02-20 12:51:48 +0100
commitd0f77d87f5fbfce7c16ace803491340258035a7f (patch)
tree239bc56ece25f90017d93964e8a854c8b0e71109 /drivers/phy/phy-stm32-usbphyc.c
parentecab0d0bc4c9868190ee9d668b666fdea8ac6a9a (diff)
downloadbarebox-d0f77d87f5fbfce7c16ace803491340258035a7f.tar.gz
barebox-d0f77d87f5fbfce7c16ace803491340258035a7f.tar.xz
treewide: use dev_err_probe instead of comparisons against EPROBE_DEFER
Drivers should not need to compare an error value against EPROBE_DEFER. We have a number of drivers doing that though to decide whether to print an error or not. This error message will be lost if the probe is deferred, so use dev_err_probe to store the error in that case. While at it, we shorten the error messages a bit. dev_err_probe will already print the string 'error' before the error code string. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240219172659.3796647-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/phy/phy-stm32-usbphyc.c')
-rw-r--r--drivers/phy/phy-stm32-usbphyc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/phy/phy-stm32-usbphyc.c b/drivers/phy/phy-stm32-usbphyc.c
index 91f4e7f7e0..6bac5e1e59 100644
--- a/drivers/phy/phy-stm32-usbphyc.c
+++ b/drivers/phy/phy-stm32-usbphyc.c
@@ -693,10 +693,7 @@ static int stm32_usbphyc_probe(struct device *dev)
phy = phy_create(phydev, child, &stm32_usbphyc_phy_ops);
if (IS_ERR(phy)) {
- ret = PTR_ERR(phy);
- if (ret != -EPROBE_DEFER)
- dev_err(dev, "failed to create phy%d: %d\n",
- port, ret);
+ ret = dev_errp_probe(dev, phy, "creating phy%d\n", port);
goto clk_disable;
}