diff options
author | Bryan Wu <cooloney@kernel.org> | 2009-01-07 16:21:18 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@kvm.kroah.org> | 2009-01-28 00:15:35 (GMT) |
commit | dd4dff8b035f6dda69ece98e20d4c2d76b9f97d1 (patch) | |
tree | e511ec053fc8f5fa6400bda583f8968e0a4e4f8d | |
parent | cd67435ef985d0d6279803f2ae48b5248a7178df (diff) | |
download | linux-fsl-qoriq-dd4dff8b035f6dda69ece98e20d4c2d76b9f97d1.tar.xz |
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>
-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 f2da026..363951e 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; |