aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/sbus/char/vfc_dev.c
diff options
context:
space:
mode:
authorMatthias Kaehlcke <matthias.kaehlcke@gmail.com>2007-07-31 03:39:23 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-31 18:39:43 -0400
commit8e48591700f7df5969e17b0a41b7dde011c6810c (patch)
treeac4eabc67325b56f0911c639a0865ab763953186 /drivers/sbus/char/vfc_dev.c
parent0af1a4504699524c876361845bc2e301ecc45d0f (diff)
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)
248 buffer,inout.len); 248 buffer,inout.len);
249 249
250 if (copy_to_user(argp,&inout,sizeof(inout))) { 250 if (copy_to_user(argp,&inout,sizeof(inout))) {
251 vfc_unlock_device(dev);
251 kfree(buffer); 252 kfree(buffer);
252 return -EFAULT; 253 return -EFAULT;
253 } 254 }