Skip to content

Commit

Permalink
USB: composite: Fix bug: should test set_alt function pointer before …
Browse files Browse the repository at this point in the history
…use it

Signed-off-by: Bryan Wu <cooloney@kernel.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Bryan Wu authored and Greg Kroah-Hartman committed Jan 28, 2009
1 parent cd67435 commit dd4dff8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/composite.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit dd4dff8

Please sign in to comment.