[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211205215846.153703-3-aouledameur@baylibre.com>
Date: Sun, 5 Dec 2021 22:58:45 +0100
From: Amjad Ouled-Ameur <aouledameur@...libre.com>
To: khilman@...libre.com
Cc: Amjad Ouled-Ameur <aouledameur@...libre.com>,
p.zabel@...gutronix.de, balbi@...nel.org, jbrunet@...libre.com,
linux-amlogic@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org, martin.blumenstingl@...glemail.com
Subject: [PATCH v4 2/3] phy: amlogic: meson8b-usb2: Use dev_err_probe()
Use the existing dev_err_probe() helper instead of open-coding the same
operation.
Signed-off-by: Amjad Ouled-Ameur <aouledameur@...libre.com>
Reported-by: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
---
drivers/phy/amlogic/phy-meson8b-usb2.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/amlogic/phy-meson8b-usb2.c b/drivers/phy/amlogic/phy-meson8b-usb2.c
index cf10bed40528..77e7e9b1428c 100644
--- a/drivers/phy/amlogic/phy-meson8b-usb2.c
+++ b/drivers/phy/amlogic/phy-meson8b-usb2.c
@@ -265,8 +265,9 @@ static int phy_meson8b_usb2_probe(struct platform_device *pdev)
return PTR_ERR(priv->clk_usb);
priv->reset = devm_reset_control_get_optional_shared(&pdev->dev, NULL);
- if (PTR_ERR(priv->reset) == -EPROBE_DEFER)
- return PTR_ERR(priv->reset);
+ if (IS_ERR(priv->reset))
+ return dev_err_probe(&pdev->dev, PTR_ERR(priv->reset),
+ "Failed to get the reset line");
priv->dr_mode = of_usb_get_dr_mode_by_phy(pdev->dev.of_node, -1);
if (priv->dr_mode == USB_DR_MODE_UNKNOWN) {
--
2.25.1
Powered by blists - more mailing lists