From patchwork Sat Mar 7 10:09:14 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Delvare X-Patchwork-Id: 10466 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n27A9NhL028935 for ; Sat, 7 Mar 2009 10:09:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751024AbZCGKJX (ORCPT ); Sat, 7 Mar 2009 05:09:23 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751376AbZCGKJW (ORCPT ); Sat, 7 Mar 2009 05:09:22 -0500 Received: from zone0.gcu-squad.org ([212.85.147.21]:2571 "EHLO services.gcu-squad.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751024AbZCGKJW (ORCPT ); Sat, 7 Mar 2009 05:09:22 -0500 Received: from jdelvare.pck.nerim.net ([62.212.121.182] helo=hyperion.delvare) by services.gcu-squad.org (GCU Mailer Daemon) with esmtpsa id 1LfuXF-00038d-Ao (TLSv1:AES256-SHA:256) (envelope-from ) ; Sat, 07 Mar 2009 12:17:41 +0100 Date: Sat, 7 Mar 2009 11:09:14 +0100 From: Jean Delvare To: LMML Cc: Trent Piepho , Hans Verkuil Subject: [PATCH] zoran: Don't frighten users with failed buffer allocation Message-ID: <20090307110914.5f35d4d2@hyperion.delvare> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.14.4; x86_64-suse-linux-gnu) Mime-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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. Signed-off-by: Jean Delvare Cc: Trent Piepho Cc: Hans Verkuil --- linux/drivers/media/video/zoran/zoran_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- v4l-dvb.orig/linux/drivers/media/video/zoran/zoran_driver.c 2009-03-02 11:19:20.000000000 +0100 +++ v4l-dvb/linux/drivers/media/video/zoran/zoran_driver.c 2009-03-02 11:19:21.000000000 +0100 @@ -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