Skip to contentSkip to conversation

s2255drv: atomic submit urb in completion handler

PATCH New Pete Eberlein 1 participant 1 message Apr 2, 2011 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s2255drv: atomic submit urb in completion handler

An usb_submit_urb should be atomic in a completion handler. This fixes "BUG: scheduling while atomic" messages.

drivers/media/video/s2255drv.c +1 -1
index f5a46c4..85c3158 100644
@@ -2406,7 +2406,7 @@ static void read_pipe_completion(struct urb *purb)
                          read_pipe_completion, pipe_info);
 
        if (pipe_info->state != 0) {
-               if (usb_submit_urb(pipe_info->stream_urb, GFP_KERNEL)) {
+               if (usb_submit_urb(pipe_info->stream_urb, GFP_ATOMIC)) {
                        dev_err(&dev->udev->dev, "error submitting urb\n");
                }
        } else {