diff options
author | Andreas Larsson <andreas@gaisler.com> | 2014-04-01 12:15:17 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-04-21 14:07:28 -0500 |
commit | 8652bcbfa09ca5ba24423c7c45c28b7d8771e0a8 (patch) | |
tree | 5a670e6d8235d23d4a81efc5ca0e5b83f133d7e1 /drivers/usb/gadget/gr_udc.c | |
parent | b38d27e5527c33a2a1f5bb3aee39b755e57dea86 (diff) | |
download | op-kernel-dev-8652bcbfa09ca5ba24423c7c45c28b7d8771e0a8.zip op-kernel-dev-8652bcbfa09ca5ba24423c7c45c28b7d8771e0a8.tar.gz |
usb: gadget: gr_udc: Use GFP_ATOMIC when allocating under held spinlock
As gr_ep_init must be called with dev->lock held, GFP_KERNEL must not be used.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/gr_udc.c')
-rw-r--r-- | drivers/usb/gadget/gr_udc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/gr_udc.c b/drivers/usb/gadget/gr_udc.c index 72458be..4966971 100644 --- a/drivers/usb/gadget/gr_udc.c +++ b/drivers/usb/gadget/gr_udc.c @@ -1990,8 +1990,8 @@ static int gr_ep_init(struct gr_udc *dev, int num, int is_in, u32 maxplimit) INIT_LIST_HEAD(&ep->queue); if (num == 0) { - _req = gr_alloc_request(&ep->ep, GFP_KERNEL); - buf = devm_kzalloc(dev->dev, PAGE_SIZE, GFP_DMA | GFP_KERNEL); + _req = gr_alloc_request(&ep->ep, GFP_ATOMIC); + buf = devm_kzalloc(dev->dev, PAGE_SIZE, GFP_DMA | GFP_ATOMIC); if (!_req || !buf) { /* possible _req freed by gr_probe via gr_remove */ return -ENOMEM; |