Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 28345
b: refs/heads/master
c: 83196b5
h: refs/heads/master
i:
  28343: b1c1db4
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Jun 21, 2006
1 parent 913fd41 commit 83b991b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 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: 212a4b4ed1ea9a969f3f967b3e3a8075ad1cb4de
refs/heads/master: 83196b52053068f0240371ad2efd9d6ad685bbeb
11 changes: 5 additions & 6 deletions trunk/drivers/usb/gadget/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ struct kiocb_priv {
struct usb_request *req;
struct ep_data *epdata;
void *buf;
char __user *ubuf;
char __user *ubuf; /* NULL for writes */
unsigned actual;
};

Expand Down Expand Up @@ -566,7 +566,6 @@ static ssize_t ep_aio_read_retry(struct kiocb *iocb)
status = priv->actual;
kfree(priv->buf);
kfree(priv);
aio_put_req(iocb);
return status;
}

Expand All @@ -580,8 +579,8 @@ static void ep_aio_complete(struct usb_ep *ep, struct usb_request *req)
spin_lock(&epdata->dev->lock);
priv->req = NULL;
priv->epdata = NULL;
if (NULL == iocb->ki_retry
|| unlikely(0 == req->actual)
if (priv->ubuf == NULL
|| unlikely(req->actual == 0)
|| unlikely(kiocbIsCancelled(iocb))) {
kfree(req->buf);
kfree(priv);
Expand Down Expand Up @@ -618,7 +617,7 @@ ep_aio_rwtail(
char __user *ubuf
)
{
struct kiocb_priv *priv = (void *) &iocb->private;
struct kiocb_priv *priv;
struct usb_request *req;
ssize_t value;

Expand Down Expand Up @@ -670,7 +669,7 @@ ep_aio_rwtail(
kfree(priv);
put_ep(epdata);
} else
value = -EIOCBQUEUED;
value = (ubuf ? -EIOCBRETRY : -EIOCBQUEUED);
return value;
}

Expand Down

0 comments on commit 83b991b

Please sign in to comment.