diff mbox series

[v1] phy: rockchip-inno-usb2: Prevent incorrect error on probe

Message ID 20220625212711.558495-1-pgwipeout@gmail.com
State Accepted
Commit b113e55913e7f7f031d6cbf9d7b585c6b112f55a
Headers show
Series [v1] phy: rockchip-inno-usb2: Prevent incorrect error on probe | expand

Commit Message

Peter Geis June 25, 2022, 9:27 p.m. UTC
If a phy supply is designated but isn't available at probe time, an
EPROBE_DEFER is returned. Use dev_err_probe to prevent this from
incorrectly printing during boot.

Signed-off-by: Peter Geis <pgwipeout@gmail.com>
---
 drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Vinod Koul July 5, 2022, 6:33 a.m. UTC | #1
On 25-06-22, 17:27, Peter Geis wrote:
> If a phy supply is designated but isn't available at probe time, an
> EPROBE_DEFER is returned. Use dev_err_probe to prevent this from
> incorrectly printing during boot.

Applied, thanks
diff mbox series

Patch

diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
index 6e44069617df..706a2263b0b2 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
@@ -1289,7 +1289,7 @@  static int rockchip_usb2phy_probe(struct platform_device *pdev)
 
 		phy = devm_phy_create(dev, child_np, &rockchip_usb2phy_ops);
 		if (IS_ERR(phy)) {
-			dev_err(dev, "failed to create phy\n");
+			dev_err_probe(dev, PTR_ERR(phy), "failed to create phy\n");
 			ret = PTR_ERR(phy);
 			goto put_child;
 		}