From: Mike Lockwood Date: Fri, 26 Feb 2010 14:30:01 +0000 (-0500) Subject: USB: gadget: composite: Don't call set_alt() on functions that are hidden. X-Git-Tag: firefly_0821_release~7613^2~818 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8c6a6b21809e2c17fea5653e9e7bb87969507766;p=firefly-linux-kernel-4.4.55.git USB: gadget: composite: Don't call set_alt() on functions that are hidden. Signed-off-by: Mike Lockwood --- diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 46a650822127..cf7a5cf8503e 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -484,6 +484,8 @@ static int set_config(struct usb_composite_dev *cdev, if (!f) break; + if (f->hidden) + continue; /* * Record which endpoints are used by the function. This is used