Commit 02e8161e authored by Benoit Goby's avatar Benoit Goby Committed by Greg Kroah-Hartman

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: default avatarBenoit Goby <benoit@android.com>
Signed-off-by: default avatarAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Acked-by: default avatarMichal Nazarewicz <mina86@mina86.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 51cce6fc
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment