浏览代码

V4L/DVB (10932): 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: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean Delvare 16 年之前
父节点
当前提交
ee9a9d661d
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      drivers/media/video/zoran/zoran_driver.c

+ 2 - 1
drivers/media/video/zoran/zoran_driver.c

@@ -229,7 +229,8 @@ v4l_fbuffer_alloc (struct file *file)
 				ZR_DEVNAME(zr), i);
 
 		//udelay(20);
-		mem = kmalloc(fh->buffers.buffer_size, GFP_KERNEL);
+		mem = kmalloc(fh->buffers.buffer_size,
+			      GFP_KERNEL | __GFP_NOWARN);
 		if (!mem) {
 			dprintk(1,
 				KERN_ERR