summaryrefslogtreecommitdiffstats
path: root/drivers/media/tuners
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2014-08-09 12:35:00 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-09-21 17:23:45 -0300
commit66f6319936344279466bd09f9788e888e03c99a0 (patch)
treef6ac01c4f884777d4947f28d8f4f24b78266449f /drivers/media/tuners
parentf69429447ac11edfcbedd11cff62917831141e35 (diff)
downloadlinux-66f6319936344279466bd09f9788e888e03c99a0.tar.bz2
[media] it913x: avoid division by zero on error case
Error on init leaves some internal divisor zero, which causes oops later. Fix it by populating divisors even it fails. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/tuners')
-rw-r--r--drivers/media/tuners/tuner_it913x.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/tuners/tuner_it913x.c b/drivers/media/tuners/tuner_it913x.c
index 3265d9ab3c67..cd20c5b0f07e 100644
--- a/drivers/media/tuners/tuner_it913x.c
+++ b/drivers/media/tuners/tuner_it913x.c
@@ -154,6 +154,9 @@ static int it913x_init(struct dvb_frontend *fe)
val = 16;
break;
case -ENODEV:
+ /* FIXME: these are just avoid divide by 0 */
+ state->tun_xtal = 2000;
+ state->tun_fdiv = 3;
return -ENODEV;
case 1:
default: