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

Commit 53598051 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mauro Carvalho Chehab
Browse files

[media] it913x-fe: use ARRAY_SIZE() as a cleanup



This code looks suspicious, but it turns out that "nv" is an array of u8
so sizeof() is the same as ARRAY_SIZE().  Using ARRAY_SIZE() is more
readable though.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Cc: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 3bfb4100
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -199,7 +199,7 @@ static int it913x_init_tuner(struct it913x_fe_state *state)

	if (reg < 0)
		return -ENODEV;
	else if (reg < sizeof(nv))
	else if (reg < ARRAY_SIZE(nv))
		nv_val = nv[reg];
	else
		nv_val = 2;