commit 221a09d5c4cb8384d9be74db60f37a5752675255
tree 66da0b068aa62537b53252a2f1316c5183f895f2
parent f7668162a366d1ce0fe84122d11108e13a8ce950
author Andrew de Quincey <[EMAIL PROTECTED]> 1164229281 -0300
committer Mauro Carvalho Chehab <[EMAIL PROTECTED]> 1164546163 -0200

V4L/DVB (4874): Fix oops on symbol rate==0

The tda10086 causes an oops (divide by zero) if a zero symbol rate is used;
this prevents this.

Signed-off-by: Andrew de Quincey <[EMAIL PROTECTED]>
Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>

 drivers/media/dvb/frontends/tda10086.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/media/dvb/frontends/tda10086.c 
index 7456b0b..4c27a2d 100644
--- a/drivers/media/dvb/frontends/tda10086.c
+++ b/drivers/media/dvb/frontends/tda10086.c
@@ -441,6 +441,10 @@ static int tda10086_get_frontend(struct
        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);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to