summaryrefslogtreecommitdiffstats
path: root/drivers/sbus
diff options
context:
space:
mode:
authorMatthias Kaehlcke <matthias.kaehlcke@gmail.com>2007-07-31 10:37:24 +0200
committerDavid S. Miller <davem@davemloft.net>2007-07-31 10:37:24 +0200
commit2fa3195d72f7d0cfb4dcb2b0dfa265ed0fa5cfa3 (patch)
tree89da0b8ac2776f104d7852b27d0aaba47ab953a1 /drivers/sbus
parent[SPARC64]: Add missing dma_get_cache_alignment(). (diff)
downloadlinux-2fa3195d72f7d0cfb4dcb2b0dfa265ed0fa5cfa3.tar.xz
linux-2fa3195d72f7d0cfb4dcb2b0dfa265ed0fa5cfa3.zip
[SPARC] 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> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/sbus')
-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;
}