]> git.baikalelectronics.ru Git - kernel.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)
commite5330a772e7425a0cf295bf2a0c03cdc6f2d680a
treeb875976a8c6f9c70fd647fe532c661da872ad476
parent27419414cce7043d831e393b930ab7baa056af2a
[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