summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/media/dvb-frontends
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/media/dvb-frontends')
-rw-r--r--kernel/drivers/media/dvb-frontends/af9013.c4
-rw-r--r--kernel/drivers/media/dvb-frontends/cx24116.c8
-rw-r--r--kernel/drivers/media/dvb-frontends/cx24117.c2
-rw-r--r--kernel/drivers/media/dvb-frontends/s5h1420.c2
4 files changed, 10 insertions, 6 deletions
diff --git a/kernel/drivers/media/dvb-frontends/af9013.c b/kernel/drivers/media/dvb-frontends/af9013.c
index 8001690d7..ba6c8f6c4 100644
--- a/kernel/drivers/media/dvb-frontends/af9013.c
+++ b/kernel/drivers/media/dvb-frontends/af9013.c
@@ -605,6 +605,10 @@ static int af9013_set_frontend(struct dvb_frontend *fe)
}
}
+ /* Return an error if can't find bandwidth or the right clock */
+ if (i == ARRAY_SIZE(coeff_lut))
+ return -EINVAL;
+
ret = af9013_wr_regs(state, 0xae00, coeff_lut[i].val,
sizeof(coeff_lut[i].val));
}
diff --git a/kernel/drivers/media/dvb-frontends/cx24116.c b/kernel/drivers/media/dvb-frontends/cx24116.c
index 2916d7c74..7bc68b355 100644
--- a/kernel/drivers/media/dvb-frontends/cx24116.c
+++ b/kernel/drivers/media/dvb-frontends/cx24116.c
@@ -963,6 +963,10 @@ static int cx24116_send_diseqc_msg(struct dvb_frontend *fe,
struct cx24116_state *state = fe->demodulator_priv;
int i, ret;
+ /* Validate length */
+ if (d->msg_len > sizeof(d->msg))
+ return -EINVAL;
+
/* Dump DiSEqC message */
if (debug) {
printk(KERN_INFO "cx24116: %s(", __func__);
@@ -974,10 +978,6 @@ static int cx24116_send_diseqc_msg(struct dvb_frontend *fe,
printk(") toneburst=%d\n", toneburst);
}
- /* Validate length */
- if (d->msg_len > (CX24116_ARGLEN - CX24116_DISEQC_MSGOFS))
- return -EINVAL;
-
/* DiSEqC message */
for (i = 0; i < d->msg_len; i++)
state->dsec_cmd.args[CX24116_DISEQC_MSGOFS + i] = d->msg[i];
diff --git a/kernel/drivers/media/dvb-frontends/cx24117.c b/kernel/drivers/media/dvb-frontends/cx24117.c
index acb965ce0..af6363573 100644
--- a/kernel/drivers/media/dvb-frontends/cx24117.c
+++ b/kernel/drivers/media/dvb-frontends/cx24117.c
@@ -1043,7 +1043,7 @@ static int cx24117_send_diseqc_msg(struct dvb_frontend *fe,
dev_dbg(&state->priv->i2c->dev, ")\n");
/* Validate length */
- if (d->msg_len > 15)
+ if (d->msg_len > sizeof(d->msg))
return -EINVAL;
/* DiSEqC message */
diff --git a/kernel/drivers/media/dvb-frontends/s5h1420.c b/kernel/drivers/media/dvb-frontends/s5h1420.c
index 93eeaf711..0b4f8fe6b 100644
--- a/kernel/drivers/media/dvb-frontends/s5h1420.c
+++ b/kernel/drivers/media/dvb-frontends/s5h1420.c
@@ -180,7 +180,7 @@ static int s5h1420_send_master_cmd (struct dvb_frontend* fe,
int result = 0;
dprintk("enter %s\n", __func__);
- if (cmd->msg_len > 8)
+ if (cmd->msg_len > sizeof(cmd->msg))
return -EINVAL;
/* setup for DISEQC */