Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275804
b: refs/heads/master
c: db332bc
h: refs/heads/master
v: v3
  • Loading branch information
Paul Zimmerman authored and Greg Kroah-Hartman committed Nov 14, 2011
1 parent 86a10d0 commit 67655b2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b7a8d17db9a86db1040862600cf3a02848f83844
refs/heads/master: db332bc9b26bbd79a37241721cccc9919489d5a9
3 changes: 2 additions & 1 deletion trunk/drivers/usb/gadget/f_mass_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,8 @@ static int fsg_setup(struct usb_function *f,
if (ctrl->bRequestType !=
(USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE))
break;
if (w_index != fsg->interface_number || w_value != 0)
if (w_index != fsg->interface_number || w_value != 0 ||
w_length != 1)
return -EDOM;
VDBG(fsg, "get max LUN\n");
*(u8 *)req->buf = fsg->common->nluns - 1;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/usb/gadget/file_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ static int class_setup_req(struct fsg_dev *fsg,
if (ctrl->bRequestType != (USB_DIR_IN |
USB_TYPE_CLASS | USB_RECIP_INTERFACE))
break;
if (w_index != 0 || w_value != 0) {
if (w_index != 0 || w_value != 0 || w_length != 1) {
value = -EDOM;
break;
}
Expand Down

0 comments on commit 67655b2

Please sign in to comment.