Skip to contentSkip to conversation

zoran: Don't frighten users with failed buffer allocation

PATCH New Jean Delvare 1 participant 1 message Mar 7, 2009 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 zoran: Don't frighten users with failed buffer allocation

kmalloc() can fail for large video buffers. By default the kernel complains loudly about allocation failures, but we don't want to frighten the user, so ask kmalloc() to keep quiet on such failures.

Cc Trent Piepho <[email protected]>
Cc Hans Verkuil <[email protected]>
---
 linux/drivers/media/video/zoran/zoran_driver.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
linux/drivers/media/video/zoran/zoran_driver.c +2 -1
@@ -212,7 +212,8 @@ v4l_fbuffer_alloc (struct file *file)
 				ZR_DEVNAME(zr), i);
 
 		//udelay(20);
-		mem = kmalloc(fh->v4l_buffers.buffer_size, GFP_KERNEL);
+		mem = kmalloc(fh->v4l_buffers.buffer_size,
+			      GFP_KERNEL | __GFP_NOWARN);
 		if (!mem) {
 			dprintk(1,
 				KERN_ERR
Signature · 1 line
Jean Delvare