summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorVincent Pelletier <plr.vincent@gmail.com>2016-12-15 12:47:42 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-09 22:01:50 +0100
commit5eb97be8798189ee1080b225d0c8f14f54736bca (patch)
treec600faffa22cb32fb64fa12241c461f776daba4e /drivers/usb
parent7468e767d8f2115427f2066203e5262f5dee8c5c (diff)
downloadlinux-stable-5eb97be8798189ee1080b225d0c8f14f54736bca.tar.gz
linux-stable-5eb97be8798189ee1080b225d0c8f14f54736bca.tar.bz2
linux-stable-5eb97be8798189ee1080b225d0c8f14f54736bca.zip
usb: gadget: f_fs: Fix ExtCompat descriptor validation
[ Upstream commit 354bc45bf329494ef6051f3229ef50b9e2a7ea2a ] Reserved1 is documented as expected to be set to 0, but this test fails when it it set to 0. Reverse the condition. Signed-off-by: Vincent Pelletier <plr.vincent@gmail.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/function/f_fs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
index 273320fa30ae..4fce83266926 100644
--- a/drivers/usb/gadget/function/f_fs.c
+++ b/drivers/usb/gadget/function/f_fs.c
@@ -2263,7 +2263,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])