From patchwork Tue May 25 09:19:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 3489 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Tue, 25 May 2010 09:25:51 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra with IMAP (fetchmail-6.3.6) for (single-drop); Tue, 25 May 2010 10:28:49 -0300 (BRT) Received: from vger.kernel.org ([209.132.180.67]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1OGqOV-0005CX-OQ; Tue, 25 May 2010 09:25:51 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932325Ab0EYJZt (ORCPT + 1 other); Tue, 25 May 2010 05:25:49 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:62728 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932169Ab0EYJZs (ORCPT ); Tue, 25 May 2010 05:25:48 -0400 Received: by wyb29 with SMTP id 29so2183104wyb.19 for ; Tue, 25 May 2010 02:25:43 -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=DutchtIciFOVuMArGcnuhHMFS9oA6/z02aWGkWsi8+4=; b=CXtY7TcrBqco8tOvrPmNlZtt4vf2UfBadu/+PjNB1r0f/3PxWjFnrzUIzGBN8L3/md Ohki4iU0U99xUyoqQVtZ/m4Uoass/R+uFeovMmqwHJP1NaBERvQJr9FnTnpEYNWDSF6q UCLUoPVY+e7o6WWWs2wQJZzuECav2lAy5XfCs= 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=vdyNeEAqY+OiWlX0LXC7ddy3BzYEhHEpxX/XwTJBQInWQbyf+L9PPEpS8IjGd8I4/6 3T7uFky9hlXA7xG1kgub57VHaIi9/l/edZzyW+EoQSaH5b0+38w1+r1gLVMYtXCk1em9 IB3py3loJ073QggHD2gVEyDv61OEE2mQ5lJNg= Received: by 10.216.88.73 with SMTP id z51mr4368395wee.27.1274779235747; Tue, 25 May 2010 02:20:35 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id n61sm1424683wed.6.2010.05.25.02.20.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 25 May 2010 02:20:34 -0700 (PDT) Date: Tue, 25 May 2010 11:19:53 +0200 From: Dan Carpenter To: Jean Delvare Cc: Mauro Carvalho Chehab , "Beholder Intl. Ltd. Dmitry Belimov" , hermann pitton , Douglas Schilling Landgraf , linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch v3 1/2] video/saa7134: change dprintk() to i2cdprintk() Message-ID: <20100525091816.GA13034@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 The problem is that dprintk() dereferences "dev" which is null here. The i2cdprintk() uses "ir" so that's OK. Signed-off-by: Dan Carpenter Acked-by: Jean Delvare --- v2: Jean Delvare suggested that I use i2cdprintk() instead of modifying dprintk(). v3: V2 had a bonus cleanup that I removed from v3 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c index e5565e2..7691bf2 100644 --- a/drivers/media/video/saa7134/saa7134-input.c +++ b/drivers/media/video/saa7134/saa7134-input.c @@ -141,8 +141,8 @@ static int get_key_flydvb_trio(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) struct saa7134_dev *dev = ir->c->adapter->algo_data; if (dev == NULL) { - dprintk("get_key_flydvb_trio: " - "gir->c->adapter->algo_data is NULL!\n"); + i2cdprintk("get_key_flydvb_trio: " + "gir->c->adapter->algo_data is NULL!\n"); return -EIO; } @@ -195,8 +195,8 @@ static int get_key_msi_tvanywhere_plus(struct IR_i2c *ir, u32 *ir_key, /* is needed to access GPIO. Used by the saa_readl macro. */ struct saa7134_dev *dev = ir->c->adapter->algo_data; if (dev == NULL) { - dprintk("get_key_msi_tvanywhere_plus: " - "gir->c->adapter->algo_data is NULL!\n"); + i2cdprintk("get_key_msi_tvanywhere_plus: " + "gir->c->adapter->algo_data is NULL!\n"); return -EIO; }