]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
USB: composite: Fix bug: should test set_alt function pointer before use it
authorBryan Wu <cooloney@kernel.org>
Wed, 7 Jan 2009 16:21:18 +0000 (00:21 +0800)
committerGreg Kroah-Hartman <gregkh@kvm.kroah.org>
Wed, 28 Jan 2009 00:15:35 +0000 (16:15 -0800)
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>
drivers/usb/gadget/composite.c

index f2da0269e1b11fa8123e6b83eadbcbd689687a33..363951eb333ca331c455fc876f0f918e1667d150 100644 (file)
@@ -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;