From: wlf Date: Tue, 19 Mar 2013 12:51:14 +0000 (+0800) Subject: USB: fix usb_get_configuration bug X-Git-Tag: firefly_0821_release~7384 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c653a9c6da9bb8c2e95a8b5127de602f2aaccc6c;p=firefly-linux-kernel-4.4.55.git USB: fix usb_get_configuration bug --- diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index 26678cadfb21..86167b585f84 100644 --- a/drivers/usb/core/config.c +++ b/drivers/usb/core/config.c @@ -704,7 +704,7 @@ int usb_get_configuration(struct usb_device *dev) "descriptor/%s: %d\n", cfgno, "start", result); dev_err(ddev, "chopping to %d config(s)\n", cfgno); dev->descriptor.bNumConfigurations = cfgno; - break; + goto err; } else if (result < 4) { dev_err(ddev, "config index %d descriptor too short " "(expected %i, got %i)\n", cfgno,