From patchwork Wed May 26 14:58:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 3499 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Wed, 26 May 2010 15:06:20 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra with IMAP (fetchmail-6.3.6) for (single-drop); Wed, 26 May 2010 12:06:31 -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 1OHIBY-0005Ao-93; Wed, 26 May 2010 15:06:20 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755415Ab0EZPGS (ORCPT + 1 other); Wed, 26 May 2010 11:06:18 -0400 Received: from mail-ww0-f46.google.com ([74.125.82.46]:60261 "EHLO mail-ww0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755035Ab0EZPGS (ORCPT ); Wed, 26 May 2010 11:06:18 -0400 Received: by wwb13 with SMTP id 13so405515wwb.19 for ; Wed, 26 May 2010 08:06:16 -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:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=6vV3CYeeUg/gYvUYMwxog8cLAdpV8gtQAGX2v+stHPI=; b=ARfh7x/V2EysRJdFmUAzMem6HIWm4QlbTwdZ6pBW+3OHczaQsj/2hnRVMBqL5j2I0z aBdMPbYugZQDhf0iRh32LgWEJ7so1xOWuyurTB1+iJ/WANzau+YfVUAk7cg6VyxS2IL9 5dZCmsutdEsd/GMBlqaIykJcplLDjPa+mntkI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=CbNqMqKqxea85w5+Q7jg0epcDabsCFufhft0fLDt0mJhBj69cXeGNIIyTh8YayGhyJ G0jiXSqtmWlbx2Fn13Upm1tEyDrkakjaK1pRFsMnkmtEsgw+xThsGsWtvlXV1Ux5ezs0 E5pFnb2hibxYTbfo334Hw95BSXUOLFUIMeACQ= Received: by 10.227.136.147 with SMTP id r19mr8630242wbt.218.1274885909063; Wed, 26 May 2010 07:58:29 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id g66sm152013wej.13.2010.05.26.07.58.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 26 May 2010 07:58:27 -0700 (PDT) Date: Wed, 26 May 2010 16:58:10 +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 v4 1/2] video/saa7134: change dprintk() to i2cdprintk() Message-ID: <20100526145810.GN22515@bicker> References: <20100525091816.GA13034@bicker> <20100526144313.1d15222f@hyperion.delvare> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20100526144313.1d15222f@hyperion.delvare> 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. Also Jean Delvare pointed out a typo in the comment so we may as well fix that. 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 v4: Fixed typo in the comment. -- 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: " + "ir->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: " + "ir->c->adapter->algo_data is NULL!\n"); return -EIO; }