diff options
author | Bryan Wu <cooloney@kernel.org> | 2009-01-07 17:21:18 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@kvm.kroah.org> | 2009-01-28 01:15:35 +0100 |
commit | dd4dff8b035f6dda69ece98e20d4c2d76b9f97d1 (patch) | |
tree | e511ec053fc8f5fa6400bda583f8968e0a4e4f8d /drivers/usb/gadget | |
parent | USB: musb: Kconfig fix (diff) | |
download | linux-dd4dff8b035f6dda69ece98e20d4c2d76b9f97d1.tar.xz linux-dd4dff8b035f6dda69ece98e20d4c2d76b9f97d1.zip |
USB: composite: Fix bug: should test set_alt function pointer before 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>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/composite.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index f2da0269e1b1..363951eb333c 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -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; |