Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235302
b: refs/heads/master
c: ce1fd35
h: refs/heads/master
v: v3
  • Loading branch information
Marek Szyprowski authored and Greg Kroah-Hartman committed Feb 4, 2011
1 parent eef2f19 commit 97bdcfb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9a1b2e64020d41c577881952734fecd114af75f1
refs/heads/master: ce1fd3585709e833ad102167024e97217734dbfd
8 changes: 8 additions & 0 deletions trunk/drivers/usb/gadget/f_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,14 @@ static int __ffs_ep0_queue_wait(struct ffs_data *ffs, char *data, size_t len)
req->buf = data;
req->length = len;

/*
* UDC layer requires to provide a buffer even for ZLP, but should
* not use it at all. Let's provide some poisoned pointer to catch
* possible bug in the driver.
*/
if (req->buf == NULL)
req->buf = (void *)0xDEADBABE;

INIT_COMPLETION(ffs->ep0req_completion);

ret = usb_ep_queue(ffs->gadget->ep0, req, GFP_ATOMIC);
Expand Down

0 comments on commit 97bdcfb

Please sign in to comment.