提交 8e30ddcf 编写于 作者: R Roel Kluin 提交者: Mauro Carvalho Chehab

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: NRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NDouglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 5a5e1da5
...@@ -155,7 +155,7 @@ static int cx22700_set_tps (struct cx22700_state *state, struct dvb_ofdm_paramet ...@@ -155,7 +155,7 @@ static int cx22700_set_tps (struct cx22700_state *state, struct dvb_ofdm_paramet
p->hierarchy_information > HIERARCHY_4) p->hierarchy_information > HIERARCHY_4)
return -EINVAL; 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; return -EINVAL;
if (p->bandwidth == BANDWIDTH_7_MHZ) if (p->bandwidth == BANDWIDTH_7_MHZ)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册