diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2016-09-01 12:33:46 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2016-09-01 12:33:46 -0400 |
commit | 0cb7bf61b1e9f05027de58c80f9b46a714d24e35 (patch) | |
tree | 41fb55cf62d07b425122f9a8b96412c0d8eb99c5 /drivers/usb/core/devio.c | |
parent | aa877175e7a9982233ed8f10cb4bfddd78d82741 (diff) | |
parent | 3eab887a55424fc2c27553b7bfe32330df83f7b8 (diff) |
Merge branch 'linus' into smp/hotplug
Apply upstream changes to avoid conflicts with pending patches.
Diffstat (limited to 'drivers/usb/core/devio.c')
-rw-r--r-- | drivers/usb/core/devio.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index e9f5043a2167..e6a6d67c8705 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c | |||
@@ -241,7 +241,8 @@ static int usbdev_mmap(struct file *file, struct vm_area_struct *vma) | |||
241 | goto error_decrease_mem; | 241 | goto error_decrease_mem; |
242 | } | 242 | } |
243 | 243 | ||
244 | mem = usb_alloc_coherent(ps->dev, size, GFP_USER, &dma_handle); | 244 | mem = usb_alloc_coherent(ps->dev, size, GFP_USER | __GFP_NOWARN, |
245 | &dma_handle); | ||
245 | if (!mem) { | 246 | if (!mem) { |
246 | ret = -ENOMEM; | 247 | ret = -ENOMEM; |
247 | goto error_free_usbm; | 248 | goto error_free_usbm; |
@@ -2582,7 +2583,9 @@ static unsigned int usbdev_poll(struct file *file, | |||
2582 | if (file->f_mode & FMODE_WRITE && !list_empty(&ps->async_completed)) | 2583 | if (file->f_mode & FMODE_WRITE && !list_empty(&ps->async_completed)) |
2583 | mask |= POLLOUT | POLLWRNORM; | 2584 | mask |= POLLOUT | POLLWRNORM; |
2584 | if (!connected(ps)) | 2585 | if (!connected(ps)) |
2585 | mask |= POLLERR | POLLHUP; | 2586 | mask |= POLLHUP; |
2587 | if (list_empty(&ps->list)) | ||
2588 | mask |= POLLERR; | ||
2586 | return mask; | 2589 | return mask; |
2587 | } | 2590 | } |
2588 | 2591 | ||