diff mbox series

[V2] phy: bcm-ns-usb2: improve printing ref clk errors

Message ID 20211123221521.25323-1-zajec5@gmail.com
State Accepted
Commit 97ba12d3feca68dd240ba49c9559d9a3e13cf0cd
Headers show
Series [V2] phy: bcm-ns-usb2: improve printing ref clk errors | expand

Commit Message

Rafał Miłecki Nov. 23, 2021, 10:15 p.m. UTC
From: Rafał Miłecki <rafal@milecki.pl>

Improve message & use dev_err_probe() helper which prints actual error
(helpful for debugging) and deals with -EPROBE_DEFER.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
V2: Use dev_err_probe() - thank you Florian!
---
 drivers/phy/broadcom/phy-bcm-ns-usb2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Florian Fainelli Nov. 23, 2021, 10:18 p.m. UTC | #1
On 11/23/21 2:15 PM, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> Improve message & use dev_err_probe() helper which prints actual error
> (helpful for debugging) and deals with -EPROBE_DEFER.
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Vinod Koul Nov. 25, 2021, 5:15 a.m. UTC | #2
On 23-11-21, 23:15, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> Improve message & use dev_err_probe() helper which prints actual error
> (helpful for debugging) and deals with -EPROBE_DEFER.

Applied, thanks
diff mbox series

Patch

diff --git a/drivers/phy/broadcom/phy-bcm-ns-usb2.c b/drivers/phy/broadcom/phy-bcm-ns-usb2.c
index 98d32729a45d..6a36e187d100 100644
--- a/drivers/phy/broadcom/phy-bcm-ns-usb2.c
+++ b/drivers/phy/broadcom/phy-bcm-ns-usb2.c
@@ -132,7 +132,7 @@  static int bcm_ns_usb2_probe(struct platform_device *pdev)
 
 	usb2->ref_clk = devm_clk_get(dev, "phy-ref-clk");
 	if (IS_ERR(usb2->ref_clk)) {
-		dev_err(dev, "Clock not defined\n");
+		dev_err_probe(dev, PTR_ERR(usb2->ref_clk), "failed to get ref clk\n");
 		return PTR_ERR(usb2->ref_clk);
 	}