aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/composite.c
diff options
context:
space:
mode:
authorBryan Wu <cooloney@kernel.org>2009-01-07 11:21:18 -0500
committerGreg Kroah-Hartman <gregkh@kvm.kroah.org>2009-01-27 19:15:35 -0500
commitdd4dff8b035f6dda69ece98e20d4c2d76b9f97d1 (patch)
treee511ec053fc8f5fa6400bda583f8968e0a4e4f8d /drivers/usb/gadget/composite.c
parentcd67435ef985d0d6279803f2ae48b5248a7178df (diff)
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/composite.c')
-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)
772 f = cdev->config->interface[w_index]; 772 f = cdev->config->interface[w_index];
773 if (!f) 773 if (!f)
774 break; 774 break;
775 if (w_value && !f->get_alt) 775 if (w_value && !f->set_alt)
776 break; 776 break;
777 value = f->set_alt(f, w_index, w_value); 777 value = f->set_alt(f, w_index, w_value);
778 break; 778 break;