aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/inode.c')
-rw-r--r--drivers/usb/gadget/inode.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c
index 465ef8e2cc91..b94c049ab0d0 100644
--- a/drivers/usb/gadget/inode.c
+++ b/drivers/usb/gadget/inode.c
@@ -524,7 +524,7 @@ struct kiocb_priv {
524 unsigned actual; 524 unsigned actual;
525}; 525};
526 526
527static int ep_aio_cancel(struct kiocb *iocb, struct io_event *e) 527static int ep_aio_cancel(struct kiocb *iocb)
528{ 528{
529 struct kiocb_priv *priv = iocb->private; 529 struct kiocb_priv *priv = iocb->private;
530 struct ep_data *epdata; 530 struct ep_data *epdata;
@@ -540,7 +540,6 @@ static int ep_aio_cancel(struct kiocb *iocb, struct io_event *e)
540 // spin_unlock(&epdata->dev->lock); 540 // spin_unlock(&epdata->dev->lock);
541 local_irq_enable(); 541 local_irq_enable();
542 542
543 aio_put_req(iocb);
544 return value; 543 return value;
545} 544}
546 545
@@ -709,11 +708,11 @@ ep_aio_read(struct kiocb *iocb, const struct iovec *iov,
709 if (unlikely(usb_endpoint_dir_in(&epdata->desc))) 708 if (unlikely(usb_endpoint_dir_in(&epdata->desc)))
710 return -EINVAL; 709 return -EINVAL;
711 710
712 buf = kmalloc(iocb->ki_left, GFP_KERNEL); 711 buf = kmalloc(iocb->ki_nbytes, GFP_KERNEL);
713 if (unlikely(!buf)) 712 if (unlikely(!buf))
714 return -ENOMEM; 713 return -ENOMEM;
715 714
716 return ep_aio_rwtail(iocb, buf, iocb->ki_left, epdata, iov, nr_segs); 715 return ep_aio_rwtail(iocb, buf, iocb->ki_nbytes, epdata, iov, nr_segs);
717} 716}
718 717
719static ssize_t 718static ssize_t
@@ -728,7 +727,7 @@ ep_aio_write(struct kiocb *iocb, const struct iovec *iov,
728 if (unlikely(!usb_endpoint_dir_in(&epdata->desc))) 727 if (unlikely(!usb_endpoint_dir_in(&epdata->desc)))
729 return -EINVAL; 728 return -EINVAL;
730 729
731 buf = kmalloc(iocb->ki_left, GFP_KERNEL); 730 buf = kmalloc(iocb->ki_nbytes, GFP_KERNEL);
732 if (unlikely(!buf)) 731 if (unlikely(!buf))
733 return -ENOMEM; 732 return -ENOMEM;
734 733