summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb
diff options
context:
space:
mode:
authorAndrew de Quincey <adq_dvb@lidskialf.net>2006-11-22 21:01:21 +0000
committerAndrew de Quincey <adq_dvb@lidskialf.net>2006-11-22 21:01:21 +0000
commit4044249adf2b23eb944b0676d182611a26f2c27d (patch)
tree9c2d041ae3b0bcd913a334d7b627c37d4ca16bc2 /linux/drivers/media/dvb
parent789537fc93581d475173b1b0741022b4a1bad857 (diff)
downloadmediapointer-dvb-s2-4044249adf2b23eb944b0676d182611a26f2c27d.tar.gz
mediapointer-dvb-s2-4044249adf2b23eb944b0676d182611a26f2c27d.tar.bz2
Fix oops on symbol rate==0
From: Andrew de Quincey <adq_dvb@lidskialf.net> The tda10086 causes an oops (divide by zero) if a zero symbol rate is used; this prevents this. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r--linux/drivers/media/dvb/frontends/tda10086.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/frontends/tda10086.c b/linux/drivers/media/dvb/frontends/tda10086.c
index 7456b0b99..4c27a2d90 100644
--- a/linux/drivers/media/dvb/frontends/tda10086.c
+++ b/linux/drivers/media/dvb/frontends/tda10086.c
@@ -441,6 +441,10 @@ static int tda10086_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_pa
dprintk ("%s\n", __FUNCTION__);
+ // check for invalid symbol rate
+ if (fe_params->u.qpsk.symbol_rate < 500000)
+ return -EINVAL;
+
// calculate the updated frequency (note: we convert from Hz->kHz)
tmp64 = tda10086_read_byte(state, 0x52);
tmp64 |= (tda10086_read_byte(state, 0x51) << 8);