projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51cce6f
)
usb: gadget: composite: Initialize config->interface
author
Benoit Goby
<
[email protected]
>
Thu, 10 May 2012 08:07:58 +0000
(10:07 +0200)
committer
Greg Kroah-Hartman
<
[email protected]
>
Thu, 10 May 2012 19:21:32 +0000
(12:21 -0700)
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 <
[email protected]
>
Signed-off-by: Andrzej Pietrasiewicz <
[email protected]
>
Signed-off-by: Kyungmin Park <
[email protected]
>
Acked-by: Michal Nazarewicz <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/usb/gadget/composite.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/composite.c
b/drivers/usb/gadget/composite.c
index e51b2314f5c9d433039ef03aed4b1c2fdf3263e2..a8b8ab80bc774a56e727207457bb4da88257c250 100644
(file)
--- 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) {