[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:
Родитель
f69429447a
Коммит
66f6319936
|
@ -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:
|
||||
|
|
Загрузка…
Ссылка в новой задаче