提交 dd4dff8b 编写于 作者: B Bryan Wu 提交者: Greg Kroah-Hartman

USB: composite: Fix bug: should test set_alt function pointer before use it

Signed-off-by: NBryan Wu <cooloney@kernel.org>
Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 cd67435e
...@@ -772,7 +772,7 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) ...@@ -772,7 +772,7 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
f = cdev->config->interface[w_index]; f = cdev->config->interface[w_index];
if (!f) if (!f)
break; break;
if (w_value && !f->get_alt) if (w_value && !f->set_alt)
break; break;
value = f->set_alt(f, w_index, w_value); value = f->set_alt(f, w_index, w_value);
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册