Hi, On Wed, Dec 21, 2011 at 05:21:12PM -0800, Benoit Goby wrote: > Reset config->interface in usb_add_config, as it may contain pointers to > functions from a previous session if config is removed and re-added. > > Signed-off-by: Benoit Goby <benoit@xxxxxxxxxxx> > --- > drivers/usb/gadget/composite.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c > index dc9adc7..6bf504c 100644 > --- a/drivers/usb/gadget/composite.c > +++ b/drivers/usb/gadget/composite.c > @@ -735,6 +735,7 @@ int usb_add_config(struct usb_composite_dev *cdev, > > INIT_LIST_HEAD(&config->functions); > config->next_interface_id = 0; > + memset(config->interface, 0, sizeof(config->interface)); This makes a bit of sense, but not here. Why don't you do this when you remove the configuration ? -- balbi
Attachment:
signature.asc
Description: Digital signature