From patchwork Sat May 22 20:15:35 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 101674 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4MKG4vF022332 for ; Sat, 22 May 2010 20:16:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758061Ab0EVUP7 (ORCPT ); Sat, 22 May 2010 16:15:59 -0400 Received: from mail-vw0-f46.google.com ([209.85.212.46]:49742 "EHLO mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757978Ab0EVUP6 (ORCPT ); Sat, 22 May 2010 16:15:58 -0400 Received: by vws9 with SMTP id 9so1651798vws.19 for ; Sat, 22 May 2010 13:15:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=DBJV2y+qLWNaYfWLMAUavm0nRo9VQoCuPb6dWSPQPBA=; b=rPzDaW/TO1y2IJSXwslv4ZL78FODyUcZ02HKO4rsHAEoSTqz/91dLrMfIs8yY1c3QC mXWo/Unub3tsZxqVpe10a8XwJ8EO9wonv0CaxVDBi3rbhsp15kbfIshmnmRRQIqZALbb db5UJ5E37pLtPLjQPv0HjzRwm7OJwg9eeuoz8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=pMZv7Y64kMp6DtYHEC2fgYsRjlYbAGpSoViGmEfqbYOzTPvuwjjjClkoWAcyEo3bfR G7MK7hJo1F7DeEMSkB8MDmA2HTa7ho/B2YN9N2pMsKf1lgX1t1UWLRKj4g+opN8AoLfa 3IzXpljJzdLbKnAS+I1zqp/yx5TtDqurrYNXk= Received: by 10.220.122.224 with SMTP id m32mr2255648vcr.71.1274559357430; Sat, 22 May 2010 13:15:57 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id z17sm10697443vco.17.2010.05.22.13.15.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 22 May 2010 13:15:56 -0700 (PDT) Date: Sat, 22 May 2010 22:15:35 +0200 From: Dan Carpenter To: Mauro Carvalho Chehab Cc: Jean Delvare , "Beholder Intl. Ltd. Dmitry Belimov" , hermann pitton , Douglas Schilling Landgraf , linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] video/saa7134: potential null dereferences in debug code Message-ID: <20100522201535.GI22515@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 22 May 2010 20:16:04 +0000 (UTC) diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c index e5565e2..e14f2f8 100644 --- a/drivers/media/video/saa7134/saa7134-input.c +++ b/drivers/media/video/saa7134/saa7134-input.c @@ -61,9 +61,9 @@ MODULE_PARM_DESC(disable_other_ir, "disable full codes of " "alternative remotes from other manufacturers"); #define dprintk(fmt, arg...) if (ir_debug) \ - printk(KERN_DEBUG "%s/ir: " fmt, dev->name , ## arg) + printk(KERN_DEBUG "%s/ir: " fmt, dev ? dev->name : "", ## arg) #define i2cdprintk(fmt, arg...) if (ir_debug) \ - printk(KERN_DEBUG "%s/ir: " fmt, ir->name , ## arg) + printk(KERN_DEBUG "%s/ir: " fmt, ir ? ir->name : "", ## arg) /* Helper functions for RC5 and NEC decoding at GPIO16 or GPIO18 */ static int saa7134_rc5_irq(struct saa7134_dev *dev);