usb: ehci-mx6: Print error code on failure
authorMarek Vasut <marex@denx.de>
Thu, 21 May 2020 21:34:06 +0000 (23:34 +0200)
committerMarek Vasut <marex@denx.de>
Fri, 29 May 2020 17:23:36 +0000 (19:23 +0200)
Print the error code if the regulator enable fails, otherwise the error
message is rather useless and confusing.

Signed-off-by: Marek Vasut <marex@denx.de>
drivers/usb/host/ehci-mx6.c

index 470eddd0c9e4b226d0e3484556b07fd682bba46d..5f84c7b91d8a91e5b67c2628809d6d286db3d8bb 100644 (file)
@@ -448,7 +448,7 @@ static int mx6_init_after_reset(struct ehci_ctrl *dev)
                                           (type == USB_INIT_DEVICE) ?
                                           false : true);
                if (ret && ret != -ENOSYS) {
-                       puts("Error enabling VBUS supply\n");
+                       printf("Error enabling VBUS supply (ret=%i)\n", ret);
                        return ret;
                }
        }
@@ -615,7 +615,7 @@ static int ehci_usb_probe(struct udevice *dev)
                                           (type == USB_INIT_DEVICE) ?
                                           false : true);
                if (ret && ret != -ENOSYS) {
-                       puts("Error enabling VBUS supply\n");
+                       printf("Error enabling VBUS supply (ret=%i)\n", ret);
                        return ret;
                }
        }