Skip to contentSkip to conversation

V4L/DVB: Fix test of bandwidth range in cx22700_set_tps()

PATCH New Roel Kluin 1 participant 1 message Aug 25, 2009 Media (V4L/DVB)

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 V4L/DVB: 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.

---

drivers/media/dvb/frontends/cx22700.c +1 -1
index fbd838e..5fbc0fc 100644
@@ -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)