Commit 66f63199 authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab

[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: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent f6942944
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment