Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux...
[pandora-kernel.git] / drivers / usb / gadget / f_rndis.c
index 882484a..fa12ec8 100644 (file)
@@ -420,8 +420,7 @@ rndis_setup(struct usb_function *f, const struct usb_ctrlrequest *ctrl)
         */
        case ((USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE) << 8)
                        | USB_CDC_SEND_ENCAPSULATED_COMMAND:
-               if (w_length > req->length || w_value
-                               || w_index != rndis->ctrl_id)
+               if (w_value || w_index != rndis->ctrl_id)
                        goto invalid;
                /* read the request; process it later */
                value = w_length;