diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-10-16 03:57:21 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-10-24 07:30:14 -0400 |
commit | 470a9147899500eb4898f77816520c4b4aa1a698 (patch) | |
tree | 16b77be089b11afb418932654233bb92d8243835 | |
parent | a4789e6fc299e5437b55c878269b3d10f7707093 (diff) |
[media] usbvision-video: two use after frees
The lock has been freed in usbvision_release() so there is no need to
call mutex_unlock() here.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r-- | drivers/media/usb/usbvision/usbvision-video.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c index 68bc9615660e..9bfa041e3316 100644 --- a/drivers/media/usb/usbvision/usbvision-video.c +++ b/drivers/media/usb/usbvision/usbvision-video.c | |||
@@ -446,6 +446,7 @@ static int usbvision_v4l2_close(struct file *file) | |||
446 | if (usbvision->remove_pending) { | 446 | if (usbvision->remove_pending) { |
447 | printk(KERN_INFO "%s: Final disconnect\n", __func__); | 447 | printk(KERN_INFO "%s: Final disconnect\n", __func__); |
448 | usbvision_release(usbvision); | 448 | usbvision_release(usbvision); |
449 | return 0; | ||
449 | } | 450 | } |
450 | mutex_unlock(&usbvision->v4l2_lock); | 451 | mutex_unlock(&usbvision->v4l2_lock); |
451 | 452 | ||
@@ -1221,6 +1222,7 @@ static int usbvision_radio_close(struct file *file) | |||
1221 | if (usbvision->remove_pending) { | 1222 | if (usbvision->remove_pending) { |
1222 | printk(KERN_INFO "%s: Final disconnect\n", __func__); | 1223 | printk(KERN_INFO "%s: Final disconnect\n", __func__); |
1223 | usbvision_release(usbvision); | 1224 | usbvision_release(usbvision); |
1225 | return err_code; | ||
1224 | } | 1226 | } |
1225 | 1227 | ||
1226 | mutex_unlock(&usbvision->v4l2_lock); | 1228 | mutex_unlock(&usbvision->v4l2_lock); |