From: Sylwester Nawrocki Date: Wed, 26 Sep 2012 08:45:21 +0000 (-0300) Subject: [media] s5k6aa: Fix possible NULL pointer dereference X-Git-Tag: omap-for-v3.7-rc1/fixes-cpufreq-signed~3^2^2~19 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94c15b5e6755711af6dd81bde0f8396e24b75dc2;p=pandora-kernel.git [media] s5k6aa: Fix possible NULL pointer dereference Make sure __s5k6aa_get_crop_rect() always returns valid pointer, as it is assumed at the callers. crop->which is already validated when subdev set_crop and get_crop callbacks are called from within the v4l2-core. If it ever happens the crop operations are called directly for some reason in kernel space, with incorrect crop->which argument, just log it with WARN and return reference to the TRY crop. Reported-by: Sachin Kamat Signed-off-by: Sylwester Nawrocki Acked-by: Sachin Kamat Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed