usb: dwc3: don't log probe deferrals; but do log other error codes
authorBrian Norris <briannorris@chromium.org>
Wed, 7 Nov 2018 20:40:29 +0000 (12:40 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Dec 2019 09:41:07 +0000 (10:41 +0100)
[ Upstream commit 408d3ba006af57380fa48858b39f72fde6405031 ]

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.

Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/dwc3/core.c

index 7154a93f011434d74eb15dd8bc858cb8f39a6033..30bc5996a2f234a28f628c743b28476c06f731ad 100644 (file)
@@ -1102,7 +1102,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;
        }