diff options
| author | Benoit Goby <benoit@android.com> | 2011-12-13 16:01:41 -0800 |
|---|---|---|
| committer | Colin Cross <ccross@android.com> | 2012-04-09 13:57:59 -0700 |
| commit | 9c507c7f881eeba40e66999a06ce4727b4130148 (patch) | |
| tree | e0eb43ca83439cb598461ac281009b8aa87fddc2 | |
| parent | 894eecb7c7cdbd01c887c673a7673808e5344ce7 (diff) | |
usb: gadget: composite: Initialize config->interface
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@android.com>
| -rw-r--r-- | 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 a358252faf5..343d8426a5b 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -734,6 +734,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)); status = bind(config); if (status < 0) { |
