Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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: