aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/usbvideo
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2008-12-22 20:38:23 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-30 06:39:34 -0500
commitbe49e368fb6e20c3a90c566b040ac3d248e2ce29 (patch)
tree4589ff61765eac19f61f6bc609c67be96320d2da /drivers/media/video/usbvideo
parent14983d8163c78826386404b27ee5bfc72e25a9d4 (diff)
V4L/DVB (9972): v4l: usbvideo, fix module ref count check
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 'drivers/media/video/usbvideo')
-rw-r--r--drivers/media/video/usbvideo/usbvideo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/usbvideo/usbvideo.c b/drivers/media/video/usbvideo/usbvideo.c
index a42049de2bb6..148a1f98c70f 100644
--- a/drivers/media/video/usbvideo/usbvideo.c
+++ b/drivers/media/video/usbvideo/usbvideo.c
@@ -1123,7 +1123,7 @@ static int usbvideo_v4l_open(struct inode *inode, struct file *file)
1123 if (uvd->debug > 1) 1123 if (uvd->debug > 1)
1124 dev_info(&uvd->dev->dev, "%s($%p)\n", __func__, dev); 1124 dev_info(&uvd->dev->dev, "%s($%p)\n", __func__, dev);
1125 1125
1126 if (0 < usbvideo_ClientIncModCount(uvd)) 1126 if (usbvideo_ClientIncModCount(uvd) < 0)
1127 return -ENODEV; 1127 return -ENODEV;
1128 mutex_lock(&uvd->lock); 1128 mutex_lock(&uvd->lock);
1129 1129