]> git.karo-electronics.de Git - linux-beck.git/commit
[media] media: cx18, ivtv: eliminate unnecessary array index checks
authorNickolai Zeldovich <nickolai@csail.mit.edu>
Mon, 7 Jan 2013 00:52:03 +0000 (21:52 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 5 Feb 2013 21:19:44 +0000 (19:19 -0200)
commita46edeb0f6098088f316c3543474784f8108508e
treeb875976a8c6f9c70fd647fe532c661da872ad476
parent7e20f6bfc47992d93b36f4ed068782f8726b75a3
[media] media: cx18, ivtv: eliminate unnecessary array index checks

The idx values passed to cx18_i2c_register() and ivtv_i2c_register()
by cx18_init_subdevs() and ivtv_load_and_init_modules() respectively
are always in-range, based on how the hw_all bitmask is populated.
Previously, the checks were already ineffective because arrays were
being dereferenced using the index before the check.

Acked-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/pci/cx18/cx18-i2c.c
drivers/media/pci/ivtv/ivtv-i2c.c