Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64287
b: refs/heads/master
c: 88e45db
h: refs/heads/master
i:
  64285: 91ed910
  64283: d5b1036
  64279: b491bb4
  64271: 156cdd5
  64255: 4024b62
v: v3
  • Loading branch information
Luis Lloret authored and Greg Kroah-Hartman committed Aug 22, 2007
1 parent 9684402 commit d7198e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 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: 468d13623b6c8d048abab71ed465fa8ad3bf8875
refs/heads/master: 88e45dbbababd29cd6c80a3e0b60a828676b3ba9
7 changes: 4 additions & 3 deletions trunk/drivers/usb/gadget/file_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -1295,6 +1295,7 @@ static int class_setup_req(struct fsg_dev *fsg,
struct usb_request *req = fsg->ep0req;
int value = -EOPNOTSUPP;
u16 w_index = le16_to_cpu(ctrl->wIndex);
u16 w_value = le16_to_cpu(ctrl->wValue);
u16 w_length = le16_to_cpu(ctrl->wLength);

if (!fsg->config)
Expand All @@ -1308,7 +1309,7 @@ static int class_setup_req(struct fsg_dev *fsg,
if (ctrl->bRequestType != (USB_DIR_OUT |
USB_TYPE_CLASS | USB_RECIP_INTERFACE))
break;
if (w_index != 0) {
if (w_index != 0 || w_value != 0) {
value = -EDOM;
break;
}
Expand All @@ -1324,7 +1325,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) {
if (w_index != 0 || w_value != 0) {
value = -EDOM;
break;
}
Expand All @@ -1343,7 +1344,7 @@ static int class_setup_req(struct fsg_dev *fsg,
if (ctrl->bRequestType != (USB_DIR_OUT |
USB_TYPE_CLASS | USB_RECIP_INTERFACE))
break;
if (w_index != 0) {
if (w_index != 0 || w_value != 0) {
value = -EDOM;
break;
}
Expand Down

0 comments on commit d7198e9

Please sign in to comment.