From: Brandon Philips Date: Fri, 5 Oct 2007 19:26:27 +0000 (-0300) Subject: V4L/DVB (6305): V4L: videobuf-core.c avoid NULL dereferences in videobuf-core X-Git-Tag: v2.6.24-rc1~1463^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49ee718ef51f4d938f80f67207e1bfa2a38897a4;p=pandora-kernel.git V4L/DVB (6305): V4L: videobuf-core.c avoid NULL dereferences in videobuf-core The return value of videobuf_alloc() is unchecked but this function will return NULL on an error. Check for NULL and make videobuf_reqbufs() return the number of successfully allocated buffers. Also, fix saa7146_video.c and bttv-driver.c to use this returned buffer count. Tested against the vivi driver. Not tested against saa7146 or bt8xx devices. Signed-off-by: Brandon Philips Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed