Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be49e368 authored by Jiri Slaby's avatar Jiri Slaby Committed by Mauro Carvalho Chehab
Browse files

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: default avatarJiri Slaby <jirislaby@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 14983d81
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);