The invalid value that should not be let through is 0x3 (4 transactions
per microframe).

Reported-by: David Binderman <dcb...@hotmail.com>
Signed-off-by: Andreas Larsson <andr...@gaisler.com>
---
 drivers/usb/gadget/gr_udc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/gr_udc.c b/drivers/usb/gadget/gr_udc.c
index 99a37ed..4c5faca 100644
--- a/drivers/usb/gadget/gr_udc.c
+++ b/drivers/usb/gadget/gr_udc.c
@@ -1532,7 +1532,7 @@ static int gr_ep_enable(struct usb_ep *_ep,
                        "%s mode: multiple trans./microframe not valid\n",
                        (mode == 2 ? "Bulk" : "Control"));
                return -EINVAL;
-       } else if (nt == 0x11) {
+       } else if (nt == 0x3) {
                dev_err(dev->dev, "Invalid value for trans./microframe\n");
                return -EINVAL;
        } else if ((nt + 1) * max > buffer_size) {
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to