summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/usbvideo
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-12-23 01:38:23 +0000
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-23 01:38:23 +0000
commitbba7ba66b44e9f98fbf2c6019be85b8448f0a3a7 (patch)
tree3020a0673620a39c5ea5fd8eab39ff3ee25996db /linux/drivers/media/video/usbvideo
parent43e99e5ec6d0b7bc9249119867ff553cba80b0ee (diff)
downloadmediapointer-dvb-s2-bba7ba66b44e9f98fbf2c6019be85b8448f0a3a7.tar.gz
mediapointer-dvb-s2-bba7ba66b44e9f98fbf2c6019be85b8448f0a3a7.tar.bz2
v4l: usbvideo, fix module ref count check
From: Jiri Slaby <jirislaby@gmail.com> usbvideo_ClientIncModCount may return value < 0 in the case of error, not > 0. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/usbvideo')
-rw-r--r--linux/drivers/media/video/usbvideo/usbvideo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/drivers/media/video/usbvideo/usbvideo.c b/linux/drivers/media/video/usbvideo/usbvideo.c
index 332929bb2..85409c624 100644
--- a/linux/drivers/media/video/usbvideo/usbvideo.c
+++ b/linux/drivers/media/video/usbvideo/usbvideo.c
@@ -1123,7 +1123,7 @@ static int usbvideo_v4l_open(struct inode *inode, struct file *file)
if (uvd->debug > 1)
dev_info(&uvd->dev->dev, "%s($%p)\n", __func__, dev);
- if (0 < usbvideo_ClientIncModCount(uvd))
+ if (usbvideo_ClientIncModCount(uvd) < 0)
return -ENODEV;
mutex_lock(&uvd->lock);