Commit dd4dff8b authored by Bryan Wu's avatar Bryan Wu Committed by Greg Kroah-Hartman

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

Signed-off-by: default avatarBryan Wu <cooloney@kernel.org>
Acked-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent cd67435e
......@@ -772,7 +772,7 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
f = cdev->config->interface[w_index];
if (!f)
break;
if (w_value && !f->get_alt)
if (w_value && !f->set_alt)
break;
value = f->set_alt(f, w_index, w_value);
break;
......
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