usb: common: usb-conn-gpio: Print error on failure to get VBUS
authorThierry Reding <treding@nvidia.com>
Thu, 6 Aug 2020 16:02:48 +0000 (18:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Aug 2020 10:13:44 +0000 (12:13 +0200)
The exact error that happened trying to get the VBUS supply can be
useful to troubleshoot what's going on.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20200806160248.3936771-2-thierry.reding@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/common/usb-conn-gpio.c

index c5b516d327c7797c926d4ef3ae923231c8a63cc2..6c4e3a19f42cb07f0ced9a946f890fb8098a6728 100644 (file)
@@ -206,7 +206,7 @@ static int usb_conn_probe(struct platform_device *pdev)
 
        if (IS_ERR(info->vbus)) {
                if (PTR_ERR(info->vbus) != -EPROBE_DEFER)
-                       dev_err(dev, "failed to get vbus\n");
+                       dev_err(dev, "failed to get vbus: %ld\n", PTR_ERR(info->vbus));
                return PTR_ERR(info->vbus);
        }