mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] V4L: usbvideo, fix module ref count check
@ 2008-12-08 20:25 Jiri Slaby
  2008-12-22 12:14 ` [PATCH 1/2] " Jiri Slaby
  2008-12-22 12:14 ` [PATCH 2/2] MAINTAINERS: mark linux-uvc-devel as subscribers only Jiri Slaby
  0 siblings, 2 replies; 3+ messages in thread
From: Jiri Slaby @ 2008-12-08 20:25 UTC (permalink / raw)
  To: mchehab
  Cc: v4l-dvb-maintainer, linux-uvc-devel, video4linux-list,
	linux-kernel, Jiri Slaby

usbvideo_ClientIncModCount may return value < 0 in the case of error, not > 0.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
 drivers/media/video/usbvideo/usbvideo.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/usbvideo/usbvideo.c b/drivers/media/video/usbvideo/usbvideo.c
index 7c575bb..6ace064 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)
 	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);
 
-- 
1.6.0.5


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-12-22 12:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-08 20:25 [PATCH 1/1] V4L: usbvideo, fix module ref count check Jiri Slaby
2008-12-22 12:14 ` [PATCH 1/2] " Jiri Slaby
2008-12-22 12:14 ` [PATCH 2/2] MAINTAINERS: mark linux-uvc-devel as subscribers only Jiri Slaby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®