summaryrefslogtreecommitdiffstats
path: root/drivers/media/tuners
diff options
context:
space:
mode:
authorAntti Palosaari2014-08-09 17:35:00 +0200
committerMauro Carvalho Chehab2014-09-21 22:23:45 +0200
commit66f6319936344279466bd09f9788e888e03c99a0 (patch)
treef6ac01c4f884777d4947f28d8f4f24b78266449f /drivers/media/tuners
parent[media] it913x: fix tuner sleep power leak (diff)
downloadkernel-qcow2-linux-66f6319936344279466bd09f9788e888e03c99a0.tar.gz
kernel-qcow2-linux-66f6319936344279466bd09f9788e888e03c99a0.tar.xz
kernel-qcow2-linux-66f6319936344279466bd09f9788e888e03c99a0.zip
[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: