From: Roel Kluin Date: Thu, 27 Aug 2009 01:13:43 +0000 (-0300) Subject: V4L/DVB (12575): Fix test of bandwidth range in cx22700_set_tps() X-Git-Tag: firefly_0821_release~12959^2~52 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8e30ddcf2fbd2ec68ec42156d9a04d946d195b54;p=firefly-linux-kernel-4.4.55.git V4L/DVB (12575): Fix test of bandwidth range in cx22700_set_tps() For the bandwidth to be less than 8 MHZ and greater than 6 MHZ is logically impossible. Signed-off-by: Roel Kluin Signed-off-by: Andrew Morton Signed-off-by: Douglas Schilling Landgraf Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/frontends/cx22700.c b/drivers/media/dvb/frontends/cx22700.c index fbd838eca268..5fbc0fc37ecd 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)