Skip to content

Commit 354bc45

Browse files
vpelletierFelipe Balbi
authored and
Felipe Balbi
committed
usb: gadget: f_fs: Fix ExtCompat descriptor validation
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 <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
1 parent 96a420d commit 354bc45

File tree

1 file changed

+1
-1
lines changed
  • drivers/usb/gadget/function

1 file changed

+1
-1
lines changed

drivers/usb/gadget/function/f_fs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2252,7 +2252,7 @@ static int __ffs_data_do_os_desc(enum ffs_os_desc_type type,
22522252

22532253
if (len < sizeof(*d) ||
22542254
d->bFirstInterfaceNumber >= ffs->interfaces_count ||
2255-
!d->Reserved1)
2255+
d->Reserved1)
22562256
return -EINVAL;
22572257
for (i = 0; i < ARRAY_SIZE(d->Reserved2); ++i)
22582258
if (d->Reserved2[i])

0 commit comments

Comments
 (0)