Commit 7e7f05ca authored by Adrian Bunk's avatar Adrian Bunk Committed by Mauro Carvalho Chehab

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: default avatarAdrian Bunk <bunk@kernel.org>
Reviewed-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 1419683d
...@@ -947,7 +947,7 @@ int ivtv_v4l2_open(struct inode *inode, struct file *filp) ...@@ -947,7 +947,7 @@ int ivtv_v4l2_open(struct inode *inode, struct file *filp)
if (itv == NULL) { if (itv == NULL) {
/* Couldn't find a device registered /* Couldn't find a device registered
on that minor, shouldn't happen! */ 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; return -ENXIO;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment