diff options
author | Antti Palosaari <crope@iki.fi> | 2014-08-09 11:35:00 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-09-21 16:23:45 -0400 |
commit | 66f6319936344279466bd09f9788e888e03c99a0 (patch) | |
tree | f6ac01c4f884777d4947f28d8f4f24b78266449f /drivers/media/tuners | |
parent | f69429447ac11edfcbedd11cff62917831141e35 (diff) |
[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.c | 3 |
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) | |||
154 | val = 16; | 154 | val = 16; |
155 | break; | 155 | break; |
156 | case -ENODEV: | 156 | case -ENODEV: |
157 | /* FIXME: these are just avoid divide by 0 */ | ||
158 | state->tun_xtal = 2000; | ||
159 | state->tun_fdiv = 3; | ||
157 | return -ENODEV; | 160 | return -ENODEV; |
158 | case 1: | 161 | case 1: |
159 | default: | 162 | default: |