aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/file_storage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c
index 9998cd7af418..0551140010ee 100644
--- a/drivers/usb/gadget/file_storage.c
+++ b/drivers/usb/gadget/file_storage.c
@@ -2964,7 +2964,7 @@ static int received_cbw(struct fsg_dev *fsg, struct fsg_buffhd *bh)
2964 2964
2965 /* Is the CBW meaningful? */ 2965 /* Is the CBW meaningful? */
2966 if (cbw->Lun >= MAX_LUNS || cbw->Flags & ~USB_BULK_IN_FLAG || 2966 if (cbw->Lun >= MAX_LUNS || cbw->Flags & ~USB_BULK_IN_FLAG ||
2967 cbw->Length < 6 || cbw->Length > MAX_COMMAND_SIZE) { 2967 cbw->Length <= 0 || cbw->Length > MAX_COMMAND_SIZE) {
2968 DBG(fsg, "non-meaningful CBW: lun = %u, flags = 0x%x, " 2968 DBG(fsg, "non-meaningful CBW: lun = %u, flags = 0x%x, "
2969 "cmdlen %u\n", 2969 "cmdlen %u\n",
2970 cbw->Lun, cbw->Flags, cbw->Length); 2970 cbw->Lun, cbw->Flags, cbw->Length);