mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-18 23:18:20 +00:00
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>
This commit is contained in:
parent
14983d8163
commit
be49e368fb
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user