diff options
author | Alexey Khoroshilov <khoroshilov@ispras.ru> | 2013-08-01 23:50:47 +0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-08-09 16:33:31 +0300 |
commit | ffcba5a510af99e9d443b7e577a9cb0515c919e1 (patch) | |
tree | 405e5c85b61074aa7f5e2f19f4ae9758912f18be | |
parent | c0aefc75ce2512bc308a89ca3cb7bece63c1128f (diff) | |
download | lwn-ffcba5a510af99e9d443b7e577a9cb0515c919e1.tar.gz lwn-ffcba5a510af99e9d443b7e577a9cb0515c919e1.zip |
usb: gadget: amd5536udc: unconditionally use GFP_ATOMIC in udc_queue()
As far as prep_dma() is called with spinlock held,
we have to pass GFP_ATOMIC regardless of gfp argument.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/gadget/amd5536udc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/amd5536udc.c b/drivers/usb/gadget/amd5536udc.c index f52dcfe8f545..a9a4346c83aa 100644 --- a/drivers/usb/gadget/amd5536udc.c +++ b/drivers/usb/gadget/amd5536udc.c @@ -1122,7 +1122,7 @@ udc_queue(struct usb_ep *usbep, struct usb_request *usbreq, gfp_t gfp) goto finished; } if (ep->dma) { - retval = prep_dma(ep, req, gfp); + retval = prep_dma(ep, req, GFP_ATOMIC); if (retval != 0) goto finished; /* write desc pointer to enable DMA */ @@ -1190,7 +1190,7 @@ udc_queue(struct usb_ep *usbep, struct usb_request *usbreq, gfp_t gfp) * for PPB modes, because of chain creation reasons */ if (ep->in) { - retval = prep_dma(ep, req, gfp); + retval = prep_dma(ep, req, GFP_ATOMIC); if (retval != 0) goto finished; } |