[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)
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>

No differences found