diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2018-06-20 07:00:45 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-09-12 08:00:36 -0400 |
commit | fc8af4fb3ebf705e9e37fb8e80f5de985c10bb11 (patch) | |
tree | 8dc9e82ef2395c15bcc4a36172db5447d6490cad /drivers/media/usb | |
parent | 3dae3c96a5a893f94f127dd4d5f58697bd234d1b (diff) | |
download | linux-stable-fc8af4fb3ebf705e9e37fb8e80f5de985c10bb11.tar.gz linux-stable-fc8af4fb3ebf705e9e37fb8e80f5de985c10bb11.tar.bz2 linux-stable-fc8af4fb3ebf705e9e37fb8e80f5de985c10bb11.zip |
media: em28xx-audio: use GFP_KERNEL for memory allocation during init
As far as I can tell em28xx_audio_urb_init() is called once during
initialization from non atomic context. Memory allocation from
non atomic context should use GFP_KERNEL to avoid using emergency pool
for memory allocation.
Use GFP_KERNEL for memory allocation.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/usb')
-rw-r--r-- | drivers/media/usb/em28xx/em28xx-audio.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-audio.c b/drivers/media/usb/em28xx/em28xx-audio.c index d5e2c19f600d..8fad891fd601 100644 --- a/drivers/media/usb/em28xx/em28xx-audio.c +++ b/drivers/media/usb/em28xx/em28xx-audio.c @@ -842,11 +842,11 @@ static int em28xx_audio_urb_init(struct em28xx *dev) dev->adev.transfer_buffer = kcalloc(num_urb, sizeof(*dev->adev.transfer_buffer), - GFP_ATOMIC); + GFP_KERNEL); if (!dev->adev.transfer_buffer) return -ENOMEM; - dev->adev.urb = kcalloc(num_urb, sizeof(*dev->adev.urb), GFP_ATOMIC); + dev->adev.urb = kcalloc(num_urb, sizeof(*dev->adev.urb), GFP_KERNEL); if (!dev->adev.urb) { kfree(dev->adev.transfer_buffer); return -ENOMEM; @@ -859,14 +859,14 @@ static int em28xx_audio_urb_init(struct em28xx *dev) int j, k; void *buf; - urb = usb_alloc_urb(npackets, GFP_ATOMIC); + urb = usb_alloc_urb(npackets, GFP_KERNEL); if (!urb) { em28xx_audio_free_urb(dev); return -ENOMEM; } dev->adev.urb[i] = urb; - buf = usb_alloc_coherent(udev, npackets * ep_size, GFP_ATOMIC, + buf = usb_alloc_coherent(udev, npackets * ep_size, GFP_KERNEL, &urb->transfer_dma); if (!buf) { dev_err(&dev->intf->dev, |