From patchwork Tue Aug 25 13:25:19 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roel Kluin X-Patchwork-Id: 43755 X-Patchwork-Delegate: dougsland@redhat.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7PDLY5i029134 for ; Tue, 25 Aug 2009 13:21:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752877AbZHYNUm (ORCPT ); Tue, 25 Aug 2009 09:20:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752638AbZHYNUm (ORCPT ); Tue, 25 Aug 2009 09:20:42 -0400 Received: from mail-ew0-f206.google.com ([209.85.219.206]:57038 "EHLO mail-ew0-f206.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752647AbZHYNUl (ORCPT ); Tue, 25 Aug 2009 09:20:41 -0400 Received: by ewy2 with SMTP id 2so406373ewy.17 for ; Tue, 25 Aug 2009 06:20:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=M/LtuPpWZsfAUY+Hgb1RTXt8Q2xEYaTu6G3FTTLkSOI=; b=M4ZAcqmgLwN9iuzcSDKMiQiliF2KFtMjCYNCJqnmOQkQL8shobAAAHoY+KorVUTakK +reN6ixi46Bs8aZnd8N2BOaqoCuDf8uKlZgKPaitVxte7lNcPNWQaXGl+0XZkbzzxtRX pIl+Hgv8FZ3MJLVBg0fenfZ5Q2T0Z9NLvVp5Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=HXzPgCFSldVGG2t6gGuGRiSXWubflA+l5rpdFUSGNzaST6PdRoI3GsvoAj3XDAJ7m8 M1yiQtlfE1WUKHdk8D1H8eYXYWhQtFpS5npTqFSzgRXQfk8k1gvT8kDJJT1cideIg9M5 Rq6gN5dGqLfJLiJjNs+b+z9n7fPNz3dDg715w= Received: by 10.216.2.201 with SMTP id 51mr1255943wef.17.1251206416184; Tue, 25 Aug 2009 06:20:16 -0700 (PDT) Received: from zoinx.mars (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id u14sm32709628gvf.5.2009.08.25.06.20.14 (version=SSLv3 cipher=RC4-MD5); Tue, 25 Aug 2009 06:20:15 -0700 (PDT) Message-ID: <4A93E63F.90802@gmail.com> Date: Tue, 25 Aug 2009 15:25:19 +0200 From: Roel Kluin User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Thunderbird/3.0b3 MIME-Version: 1.0 To: Mauro Carvalho Chehab , linux-media@vger.kernel.org, Andrew Morton Subject: [PATCH] V4L/DVB: Fix test of bandwidth range in cx22700_set_tps() Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org For the bandwidth to be less than 8 MHZ and greater than 6 MHZ is logically impossible. Signed-off-by: Roel Kluin --- -- 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/dvb/frontends/cx22700.c b/drivers/media/dvb/frontends/cx22700.c index fbd838e..5fbc0fc 100644 --- a/drivers/media/dvb/frontends/cx22700.c +++ b/drivers/media/dvb/frontends/cx22700.c @@ -155,7 +155,7 @@ static int cx22700_set_tps (struct cx22700_state *state, struct dvb_ofdm_paramet p->hierarchy_information > HIERARCHY_4) return -EINVAL; - if (p->bandwidth < BANDWIDTH_8_MHZ && p->bandwidth > BANDWIDTH_6_MHZ) + if (p->bandwidth < BANDWIDTH_8_MHZ || p->bandwidth > BANDWIDTH_6_MHZ) return -EINVAL; if (p->bandwidth == BANDWIDTH_7_MHZ)