Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] usbvision: fix locking error

If remove_pending is non-zero, then the v4l2_lock is never unlocked.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
e2c84ccb 4eeda6fa

+1 -1
+1 -1
drivers/media/usb/usbvision/usbvision-video.c
··· 426 426 usbvision_scratch_free(usbvision); 427 427 428 428 usbvision->user--; 429 + mutex_unlock(&usbvision->v4l2_lock); 429 430 430 431 if (usbvision->remove_pending) { 431 432 printk(KERN_INFO "%s: Final disconnect\n", __func__); 432 433 usbvision_release(usbvision); 433 434 return 0; 434 435 } 435 - mutex_unlock(&usbvision->v4l2_lock); 436 436 437 437 PDEBUG(DBG_IO, "success"); 438 438 return v4l2_fh_release(file);