summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/media/dvb-frontends/af9013.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/media/dvb-frontends/af9013.c')
-rw-r--r--kernel/drivers/media/dvb-frontends/af9013.c4
1 files changed, 4 insertions, 0 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));
}