summaryrefslogtreecommitdiff
path: root/drivers/sbus/char/vfc_dev.c
diff options
context:
space:
mode:
authorMatthias Kaehlcke <matthias.kaehlcke@gmail.com>2007-07-31 11:39:23 +0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-01 02:39:43 +0400
commit8e48591700f7df5969e17b0a41b7dde011c6810c (patch)
treeac4eabc67325b56f0911c639a0865ab763953186 /drivers/sbus/char/vfc_dev.c
parent0af1a4504699524c876361845bc2e301ecc45d0f (diff)
downloadlinux-8e48591700f7df5969e17b0a41b7dde011c6810c.tar.xz
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: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Acked-by: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/sbus/char/vfc_dev.c')
-rw-r--r--drivers/sbus/char/vfc_dev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/sbus/char/vfc_dev.c b/drivers/sbus/char/vfc_dev.c
index 26b1d2a17ed2..9269f7fbd363 100644
--- a/drivers/sbus/char/vfc_dev.c
+++ b/drivers/sbus/char/vfc_dev.c
@@ -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;
}