V4L/DVB: v4l: soc_camera: fix bound checking of mbus_fmt[] index
authorBaruch Siach <baruch@tkos.co.il>
Fri, 19 Feb 2010 17:09:25 +0000 (14:09 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 15 Mar 2010 16:06:09 +0000 (09:06 -0700)
commitac3da4193bac230e0281508c0cdf530d81b0a458
treea2e7527c8cf5e39a59d43803597cd63e7c55c550
parent656bb504522676d4a9ebf218c37f7eb966e534ab
V4L/DVB: v4l: soc_camera: fix bound checking of mbus_fmt[] index

commit 84f3751d6a6f766780dee509433bf7b3dfcdf465 upstream.

When code <= V4L2_MBUS_FMT_FIXED soc_mbus_get_fmtdesc returns a pointer to
mbus_fmt[x], where x < 0. Fix this.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/media/video/soc_mediabus.c