diff options
| author | 2016-09-01 18:33:46 +0200 | |
|---|---|---|
| committer | 2016-09-01 18:33:46 +0200 | |
| commit | 0cb7bf61b1e9f05027de58c80f9b46a714d24e35 (patch) | |
| tree | 41fb55cf62d07b425122f9a8b96412c0d8eb99c5 /drivers/usb/gadget/legacy/inode.c | |
| parent | cpu/hotplug: Prevent alloc/free of irq descriptors during CPU up/down (again) (diff) | |
| parent | Linux 4.8-rc4 (diff) | |
| download | linux-dev-0cb7bf61b1e9f05027de58c80f9b46a714d24e35.tar.xz linux-dev-0cb7bf61b1e9f05027de58c80f9b46a714d24e35.zip | |
Merge branch 'linus' into smp/hotplug
Apply upstream changes to avoid conflicts with pending patches.
Diffstat (limited to 'drivers/usb/gadget/legacy/inode.c')
| -rw-r--r-- | drivers/usb/gadget/legacy/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/legacy/inode.c b/drivers/usb/gadget/legacy/inode.c index aa3707bdebb4..16104b5ebdcb 100644 --- a/drivers/usb/gadget/legacy/inode.c +++ b/drivers/usb/gadget/legacy/inode.c @@ -542,7 +542,7 @@ static ssize_t ep_aio(struct kiocb *iocb, */ spin_lock_irq(&epdata->dev->lock); value = -ENODEV; - if (unlikely(epdata->ep)) + if (unlikely(epdata->ep == NULL)) goto fail; req = usb_ep_alloc_request(epdata->ep, GFP_ATOMIC); @@ -606,7 +606,7 @@ ep_read_iter(struct kiocb *iocb, struct iov_iter *to) } if (is_sync_kiocb(iocb)) { value = ep_io(epdata, buf, len); - if (value >= 0 && copy_to_iter(buf, value, to)) + if (value >= 0 && (copy_to_iter(buf, value, to) != value)) value = -EFAULT; } else { struct kiocb_priv *priv = kzalloc(sizeof *priv, GFP_KERNEL); |
