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>
This commit is contained in:
Alexey Khoroshilov 2013-08-01 23:50:47 +04:00 committed by Felipe Balbi
parent c0aefc75ce
commit ffcba5a510
1 changed files with 2 additions and 2 deletions

View File

@ -1122,7 +1122,7 @@ udc_queue(struct usb_ep *usbep, struct usb_request *usbreq, gfp_t gfp)
goto finished; goto finished;
} }
if (ep->dma) { if (ep->dma) {
retval = prep_dma(ep, req, gfp); retval = prep_dma(ep, req, GFP_ATOMIC);
if (retval != 0) if (retval != 0)
goto finished; goto finished;
/* write desc pointer to enable DMA */ /* 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 * for PPB modes, because of chain creation reasons
*/ */
if (ep->in) { if (ep->in) {
retval = prep_dma(ep, req, gfp); retval = prep_dma(ep, req, GFP_ATOMIC);
if (retval != 0) if (retval != 0)
goto finished; goto finished;
} }