usb/hcd: Log error code if reset() fails
authorMark Brown <broonie@linaro.org>
Wed, 7 Aug 2013 21:32:40 +0000 (22:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Aug 2013 20:13:32 +0000 (13:13 -0700)
If someone provided meaningful error codes from reset() we should tell the
user what they were.

Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hcd.c

index 0ffe016f403602cacb72c3a3699e8ca09b0caa69..5aa1d133eaf9db3dcb4d0d7327cd1d57037050d6 100644 (file)
@@ -2653,7 +2653,7 @@ int usb_add_hcd(struct usb_hcd *hcd,
         * should already have been reset (and boot firmware kicked off etc).
         */
        if (hcd->driver->reset && (retval = hcd->driver->reset(hcd)) < 0) {
-               dev_err(hcd->self.controller, "can't setup\n");
+               dev_err(hcd->self.controller, "can't setup: %d\n", retval);
                goto err_hcd_driver_setup;
        }
        hcd->rh_pollable = 1;