From patchwork Thu Dec 23 19:38: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: 430621 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBNJd8Ue016205 for ; Thu, 23 Dec 2010 19:39:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751493Ab0LWTjH (ORCPT ); Thu, 23 Dec 2010 14:39:07 -0500 Received: from mail-fx0-f46.google.com ([209.85.161.46]:46419 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751258Ab0LWTjF (ORCPT ); Thu, 23 Dec 2010 14:39:05 -0500 Received: by fxm20 with SMTP id 20so7401156fxm.19 for ; Thu, 23 Dec 2010 11:39:04 -0800 (PST) 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=3pXzZqSyMa5mUYEGl905veEbkmKCG/KxdZLmIWSRX/Q=; b=tLUyYNMZ0H+nL+OlIqVRKLiBMaPsbn2I8CrLjGl3kBpVN3I638R/SFE3UC1nKmtv1I 78kQ5bUktRTy2U5InSU3oNO3kRAbRxGiO+uDIR8V7MqW3fUDHY9AV4FsP3OIODRAHBob 7+RWQVtwDqYCTGObZiY4xrxk2f4FevVwgSmG8= 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=MRyMPlpMi7MeAFGOr17ep9DLo0ogr/umwb+EXZ3nSbsVv+7UcOVDSIyvSqz8QBAZxK STNMMdN9xH8spB5xcj+04nEmFG3X77nw2FRu3FM3ItQ5iFE4xk506JDX6JDYGzxQFdmp VS1G+wo01UjZQl+u8QKoZX63eGCVF4bDRsw4s= Received: by 10.223.97.78 with SMTP id k14mr236699fan.89.1293133144417; Thu, 23 Dec 2010 11:39:04 -0800 (PST) Received: from bicker (h2d62.n1.ips.mtn.co.ug [41.210.173.98]) by mx.google.com with ESMTPS id n2sm2098719fam.4.2010.12.23.11.39.00 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 23 Dec 2010 11:39:03 -0800 (PST) Date: Thu, 23 Dec 2010 22:38:53 +0300 From: Dan Carpenter To: Sri Deevi Cc: "'Andy Walls'" , "linux-media@vger.kernel.org" , mchehab@infradead.org Subject: [patch] [media] cx231xxx: fix typo in saddr_len check Message-ID: <20101223193853.GN1936@bicker> References: <20101223164347.GA16612@bicker> <1293129292.24752.9.camel@morgan.silverblock.net> <34B38BE41EDBA046A4AFBB591FA311320249B057C6@NBMBX01.bbnet.ad> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <34B38BE41EDBA046A4AFBB591FA311320249B057C6@NBMBX01.bbnet.ad> User-Agent: Mutt/1.5.20 (2009-06-14) 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 (demeter1.kernel.org [140.211.167.41]); Thu, 23 Dec 2010 19:39:09 +0000 (UTC) diff --git a/drivers/media/video/cx231xx/cx231xx-core.c b/drivers/media/video/cx231xx/cx231xx-core.c index 44d124c..7d62d58 100644 --- a/drivers/media/video/cx231xx/cx231xx-core.c +++ b/drivers/media/video/cx231xx/cx231xx-core.c @@ -1515,7 +1515,7 @@ int cx231xx_read_i2c_master(struct cx231xx *dev, u8 dev_addr, u16 saddr, if (saddr_len == 0) saddr = 0; - else if (saddr_len == 0) + else if (saddr_len == 1) saddr &= 0xff; /* prepare xfer_data struct */ @@ -1566,7 +1566,7 @@ int cx231xx_write_i2c_master(struct cx231xx *dev, u8 dev_addr, u16 saddr, if (saddr_len == 0) saddr = 0; - else if (saddr_len == 0) + else if (saddr_len == 1) saddr &= 0xff; /* prepare xfer_data struct */ @@ -1600,7 +1600,7 @@ int cx231xx_read_i2c_data(struct cx231xx *dev, u8 dev_addr, u16 saddr, if (saddr_len == 0) saddr = 0; - else if (saddr_len == 0) + else if (saddr_len == 1) saddr &= 0xff; /* prepare xfer_data struct */ @@ -1641,7 +1641,7 @@ int cx231xx_write_i2c_data(struct cx231xx *dev, u8 dev_addr, u16 saddr, if (saddr_len == 0) saddr = 0; - else if (saddr_len == 0) + else if (saddr_len == 1) saddr &= 0xff; /* prepare xfer_data struct */