* [PATCH v2 1/1] usb: gadget: f_fs: Fix wrong check on reserved1 of OS_DESC_EXT_COMPAT
@ 2016-05-20 10:13 Jim Lin
0 siblings, 0 replies; only message in thread
From: Jim Lin @ 2016-05-20 10:13 UTC (permalink / raw)
To: balbi; +Cc: linux-usb, linux-kernel, Jim Lin
Current __ffs_data_do_os_desc() of f_fs.c will check reserved1 field
of OS_DESC_EXT_COMPAT and return -EINVAL if it's 1.
But MS OS 1.0 Descriptors
http://msdn.microsoft.com/en-us/library/windows/hardware/gg463179.aspx
defines that field to be 1.
Signed-off-by: Jim Lin <jilin@nvidia.com>
---
v2: Rewording on commit log. Original title is
usb: gadget: f_fs: Fix kernel panic for SuperSpeed
drivers/usb/gadget/function/f_fs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
index 15b648c..bd969ef 100644
--- a/drivers/usb/gadget/function/f_fs.c
+++ b/drivers/usb/gadget/function/f_fs.c
@@ -2051,7 +2051,7 @@ static int __ffs_data_do_os_desc(enum ffs_os_desc_type type,
if (len < sizeof(*d) ||
d->bFirstInterfaceNumber >= ffs->interfaces_count ||
- d->Reserved1)
+ !d->Reserved1)
return -EINVAL;
for (i = 0; i < ARRAY_SIZE(d->Reserved2); ++i)
if (d->Reserved2[i])
--
1.9.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-05-20 10:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-20 10:13 [PATCH v2 1/1] usb: gadget: f_fs: Fix wrong check on reserved1 of OS_DESC_EXT_COMPAT Jim Lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®