From patchwork Thu Apr 18 19:20:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 2462221 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 5017A3FCA5 for ; Thu, 18 Apr 2013 19:20:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756191Ab3DRTUx (ORCPT ); Thu, 18 Apr 2013 15:20:53 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:17668 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751823Ab3DRTUw (ORCPT ); Thu, 18 Apr 2013 15:20:52 -0400 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r3IJKmCl017061 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 18 Apr 2013 19:20:49 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r3IJKlhH029648 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 18 Apr 2013 19:20:47 GMT Received: from abhmt114.oracle.com (abhmt114.oracle.com [141.146.116.66]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r3IJKk2U022261; Thu, 18 Apr 2013 19:20:46 GMT Received: from elgon.mountain (/197.237.137.111) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 18 Apr 2013 12:20:45 -0700 Date: Thu, 18 Apr 2013 22:20:40 +0300 From: Dan Carpenter To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org, kbuild@01.org Subject: [patch 1/2] [media] r820t: precendence bug in r820t_xtal_check() Message-ID: <20130418192040.GA17798@elgon.mountain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: acsinet21.oracle.com [141.146.126.237] Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The test as written is always false. It looks like the intent was to test that the bit was not set. Signed-off-by: Dan Carpenter --- 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/tuners/r820t.c b/drivers/media/tuners/r820t.c index 905a106..ba033fd 100644 --- a/drivers/media/tuners/r820t.c +++ b/drivers/media/tuners/r820t.c @@ -1378,7 +1378,7 @@ static int r820t_xtal_check(struct r820t_priv *priv) rc = r820t_read(priv, 0x00, data, sizeof(data)); if (rc < 0) return rc; - if ((!data[2]) & 0x40) + if (!(data[2] & 0x40)) continue; val = data[2] & 0x3f;