]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (6328): ivtv: fix NULL dereference
authorAdrian Bunk <bunk@kernel.org>
Sun, 14 Oct 2007 17:51:37 +0000 (14:51 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Mon, 22 Oct 2007 14:01:40 +0000 (12:01 -0200)
We shouldn't dereference "itv" when we know it's NULL...

Spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/ivtv/ivtv-fileops.c

index da50fa4a72a50411a0cbb3906c070c28d0c55bbf..0e0605cc0bd3b3f8041d0af508fb77f9aacd9ce1 100644 (file)
@@ -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;
        }