diff options
author | Vincent Pelletier <plr.vincent@gmail.com> | 2016-12-15 12:47:42 +0000 |
---|---|---|
committer | Dongwoo Lee <dwoo08.lee@samsung.com> | 2019-11-26 11:22:07 +0900 |
commit | 69b88967da8f7eb0e96825d640b0b78f66691741 (patch) | |
tree | 5bbda4611cad9f7d132230e53f3645a1d9f916f4 /drivers/usb/gadget/function/f_fs.c | |
parent | 7e7b0635023131f20dd503dd9a421b353d64037c (diff) | |
download | linux-4.9-exynos9110-69b88967da8f7eb0e96825d640b0b78f66691741.tar.gz linux-4.9-exynos9110-69b88967da8f7eb0e96825d640b0b78f66691741.tar.bz2 linux-4.9-exynos9110-69b88967da8f7eb0e96825d640b0b78f66691741.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>
[dwoo08.lee: cherry-pick linux-4.9.y stable commit 5eb97be87981 to stablize f_fs]
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
Change-Id: Id8bd89a9cb5343fd0830d480ad5b2900367d8056
Diffstat (limited to 'drivers/usb/gadget/function/f_fs.c')
-rw-r--r-- | drivers/usb/gadget/function/f_fs.c | 2 |
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 d084335c8346..2d3d22c837b2 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -2264,7 +2264,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]) |