Thread (1 message) 1 message, 1 author, 2018-06-20

[14/27] media: gspca: sq930x: use GFP_KERNEL in sd_dq_callback()

flat view
DORMANTno replies

From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: 2018-06-20 11:01:36
Also in: linux-media
Subsystem: gspca usb webcam driver, media input infrastructure (v4l/dvb), the rest · Maintainers: Hans Verkuil, Mauro Carvalho Chehab, Linus Torvalds

The context in which sd_dq_callback() is non atomic, there is even
msleep() at the end of the function. There is no need to use GFP_ATOMIC
here - use GFP_KERNEL instead.

Cc: Hans Verkuil <redacted>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/media/usb/gspca/sq930x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/usb/gspca/sq930x.c b/drivers/media/usb/gspca/sq930x.c
index d7cbcf2b3947..e15b45f022e1 100644
--- a/drivers/media/usb/gspca/sq930x.c
+++ b/drivers/media/usb/gspca/sq930x.c
@@ -1044,7 +1044,7 @@ static void sd_dq_callback(struct gspca_dev *gspca_dev)
 			v4l2_ctrl_g_ctrl(sd->gain));
 
 	gspca_dev->cam.bulk_nurbs = 1;
-	ret = usb_submit_urb(gspca_dev->urb[0], GFP_ATOMIC);
+	ret = usb_submit_urb(gspca_dev->urb[0], GFP_KERNEL);
 	if (ret < 0)
 		pr_err("sd_dq_callback() err %d\n", ret);
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help