V4L/DVB (12575): Fix test of bandwidth range in cx22700_set_tps()
authorRoel Kluin <roel.kluin@gmail.com>
Thu, 27 Aug 2009 01:13:43 +0000 (22:13 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 12 Sep 2009 15:19:34 +0000 (12:19 -0300)
For the bandwidth to be less than 8 MHZ and greater than 6 MHZ is logically
impossible.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/cx22700.c

index fbd838e..5fbc0fc 100644 (file)
@@ -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)