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

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

[media] av7110_hw: fix a sanity check in av7110_fw_cmd()



ARRAY_SIZE(buf) (8 elements) was intended instead of sizeof(buf) (16
bytes).  But this is just a sanity check and the callers always pass
valid values so this doesn't cause a problem.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 46b35083
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -501,7 +501,7 @@ int av7110_fw_cmd(struct av7110 *av7110, int type, int com, int num, ...)

//	dprintk(4, "%p\n", av7110);

	if (2 + num > sizeof(buf)) {
	if (2 + num > ARRAY_SIZE(buf)) {
		printk(KERN_WARNING
		       "%s: %s len=%d is too big!\n",
		       KBUILD_MODNAME, __func__, num);