Commit 8e485917 authored by Matthias Kaehlcke's avatar Matthias Kaehlcke Committed by Linus Torvalds

Videopix Frame Grabber: Fix unreleased lock in vfc_debug()

Videopix Frame Grabber: vfc_debug() doesn't release the device lock
when copy_from_user() fails
Signed-off-by: default avatarMatthias Kaehlcke <matthias.kaehlcke@gmail.com>
Acked-by: default avatar"David S. Miller" <davem@davemloft.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0af1a450
......@@ -248,6 +248,7 @@ static int vfc_debug(struct vfc_dev *dev, int cmd, void __user *argp)
buffer,inout.len);
if (copy_to_user(argp,&inout,sizeof(inout))) {
vfc_unlock_device(dev);
kfree(buffer);
return -EFAULT;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment