usb: Fail a get config when the port is powered off.
[deliverable/linux.git] / drivers / usb / core / config.c
index f4bdd0ce8d56cdfcf3dda323d6ee2c33ec86b445..7199adccf44488dc487641de2a085361bdaa0041 100644 (file)
@@ -702,6 +702,8 @@ int usb_get_configuration(struct usb_device *dev)
                if (result < 0) {
                        dev_err(ddev, "unable to read config index %d "
                            "descriptor/%s: %d\n", cfgno, "start", result);
+                       if (result != -EPIPE)
+                               goto err;
                        dev_err(ddev, "chopping to %d config(s)\n", cfgno);
                        dev->descriptor.bNumConfigurations = cfgno;
                        break;
This page took 0.024662 seconds and 5 git commands to generate.