[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>
This commit is contained in:
Antti Palosaari 2014-08-09 12:35:00 -03:00 committed by Mauro Carvalho Chehab
parent f69429447a
commit 66f6319936

View file

@ -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: