summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorBryan Wu <cooloney@kernel.org>2009-01-07 19:21:18 +0300
committerGreg Kroah-Hartman <gregkh@kvm.kroah.org>2009-01-28 03:15:35 +0300
commitdd4dff8b035f6dda69ece98e20d4c2d76b9f97d1 (patch)
treee511ec053fc8f5fa6400bda583f8968e0a4e4f8d /drivers/usb
parentcd67435ef985d0d6279803f2ae48b5248a7178df (diff)
downloadlinux-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>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/composite.c2
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;