diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hid/usbhid/hid-core.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 832e469265ee..03cb494af1c5 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c | |||
@@ -651,13 +651,16 @@ static int hid_alloc_buffers(struct usb_device *dev, struct hid_device *hid) | |||
651 | { | 651 | { |
652 | struct usbhid_device *usbhid = hid->driver_data; | 652 | struct usbhid_device *usbhid = hid->driver_data; |
653 | 653 | ||
654 | if (!(usbhid->inbuf = usb_buffer_alloc(dev, usbhid->bufsize, GFP_ATOMIC, &usbhid->inbuf_dma))) | 654 | usbhid->inbuf = usb_buffer_alloc(dev, usbhid->bufsize, GFP_KERNEL, |
655 | return -1; | 655 | &usbhid->inbuf_dma); |
656 | if (!(usbhid->outbuf = usb_buffer_alloc(dev, usbhid->bufsize, GFP_ATOMIC, &usbhid->outbuf_dma))) | 656 | usbhid->outbuf = usb_buffer_alloc(dev, usbhid->bufsize, GFP_KERNEL, |
657 | return -1; | 657 | &usbhid->outbuf_dma); |
658 | if (!(usbhid->cr = usb_buffer_alloc(dev, sizeof(*(usbhid->cr)), GFP_ATOMIC, &usbhid->cr_dma))) | 658 | usbhid->cr = usb_buffer_alloc(dev, sizeof(*usbhid->cr), GFP_KERNEL, |
659 | return -1; | 659 | &usbhid->cr_dma); |
660 | if (!(usbhid->ctrlbuf = usb_buffer_alloc(dev, usbhid->bufsize, GFP_ATOMIC, &usbhid->ctrlbuf_dma))) | 660 | usbhid->ctrlbuf = usb_buffer_alloc(dev, usbhid->bufsize, GFP_KERNEL, |
661 | &usbhid->ctrlbuf_dma); | ||
662 | if (!usbhid->inbuf || !usbhid->outbuf || !usbhid->cr || | ||
663 | !usbhid->ctrlbuf) | ||
661 | return -1; | 664 | return -1; |
662 | 665 | ||
663 | return 0; | 666 | return 0; |