提交 02e8161e 编写于 作者: B Benoit Goby 提交者: 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: NBenoit Goby <benoit@android.com>
Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
Acked-by: NMichal Nazarewicz <mina86@mina86.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册