summaryrefslogtreecommitdiff
path: root/drivers/media/video/dabusb.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2010-08-08 23:49:58 (GMT)
committerFrederic Weisbecker <fweisbec@gmail.com>2010-08-09 00:14:15 (GMT)
commitd9a145fb6e5f37b9903dea8371ab5c3e34e8e2d1 (patch)
treee2b4bb46fa00f0ad20447e40dba6fb21a4ae0815 /drivers/media/video/dabusb.c
parentc9243f5bdd6637b2bb7dc254b54d9edf957ef17e (diff)
parent45d7f32c7a43cbb9592886d38190e379e2eb2226 (diff)
downloadlinux-fsl-qoriq-d9a145fb6e5f37b9903dea8371ab5c3e34e8e2d1.tar.xz
Merge commit 'linus/master' into bkl/core
Merge reason: The staging tree has introduced the easycap driver lately. We need the latest updates to pushdown the bkl in its ioctl helper.
Diffstat (limited to 'drivers/media/video/dabusb.c')
-rw-r--r--drivers/media/video/dabusb.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/media/video/dabusb.c b/drivers/media/video/dabusb.c
index 0f50508..5b176bd 100644
--- a/drivers/media/video/dabusb.c
+++ b/drivers/media/video/dabusb.c
@@ -706,16 +706,11 @@ static long dabusb_ioctl (struct file *file, unsigned int cmd, unsigned long arg
switch (cmd) {
case IOCTL_DAB_BULK:
- pbulk = kmalloc(sizeof (bulk_transfer_t), GFP_KERNEL);
+ pbulk = memdup_user((void __user *)arg,
+ sizeof(bulk_transfer_t));
- if (!pbulk) {
- ret = -ENOMEM;
- break;
- }
-
- if (copy_from_user (pbulk, (void __user *) arg, sizeof (bulk_transfer_t))) {
- ret = -EFAULT;
- kfree (pbulk);
+ if (IS_ERR(pbulk)) {
+ ret = PTR_ERR(pbulk);
break;
}