Skip to content

Commit

Permalink
[media] s2255drv: atomic submit urb in completion handler
Browse files Browse the repository at this point in the history
An usb_submit_urb should be atomic in a completion handler. This fixes
"BUG: scheduling while atomic" messages.

Signed-off-by: Pete Eberlein <pete@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Pete Eberlein authored and Mauro Carvalho Chehab committed May 20, 2011
1 parent 574312d commit a1b4c86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/s2255drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -2382,7 +2382,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 {
Expand Down

0 comments on commit a1b4c86

Please sign in to comment.