From f4908de3ba4ade23903a542df2fc310fdd22a455 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Wed, 7 Nov 2018 12:40:29 -0800 Subject: [PATCH] UPSTREAM: usb: dwc3: don't log probe deferrals; but do log other error codes It's not very useful to repeat a bunch of probe deferral errors. And it's also not very useful to log "failed" without telling the error code. Change-Id: Iaad54fc78cc83482937b4a7ad362fff7639a4ddd Signed-off-by: Brian Norris Signed-off-by: Felipe Balbi Signed-off-by: William Wu (cherry picked from commit 408d3ba006af57380fa48858b39f72fde6405031) --- drivers/usb/dwc3/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index b7007123d060..2cf25444df91 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -1492,7 +1492,8 @@ static int dwc3_probe(struct platform_device *pdev) ret = dwc3_core_init(dwc); if (ret) { - dev_err(dev, "failed to initialize core\n"); + if (ret != -EPROBE_DEFER) + dev_err(dev, "failed to initialize core: %d\n", ret); goto err4; }