From: Adrian Bunk Date: Sun, 14 Oct 2007 17:51:37 +0000 (-0300) Subject: V4L/DVB (6328): ivtv: fix NULL dereference X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7e7f05ca156d34b80e53105e4ef9bc1497a68439;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git V4L/DVB (6328): ivtv: fix NULL dereference We shouldn't dereference "itv" when we know it's NULL... Spotted by the Coverity checker. Signed-off-by: Adrian Bunk Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/ivtv/ivtv-fileops.c b/drivers/media/video/ivtv/ivtv-fileops.c index da50fa4a72a5..0e0605cc0bd3 100644 --- a/drivers/media/video/ivtv/ivtv-fileops.c +++ b/drivers/media/video/ivtv/ivtv-fileops.c @@ -947,7 +947,7 @@ int ivtv_v4l2_open(struct inode *inode, struct file *filp) if (itv == NULL) { /* Couldn't find a device registered on that minor, shouldn't happen! */ - IVTV_WARN("No ivtv device found on minor %d\n", minor); + printk(KERN_WARNING "No ivtv device found on minor %d\n", minor); return -ENXIO; }