Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267621
b: refs/heads/master
c: 7ec24db
h: refs/heads/master
i:
  267619: 75090d8
v: v3
  • Loading branch information
Thomas Meyer authored and Greg Kroah-Hartman committed Aug 23, 2011
1 parent a952c95 commit 009072a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 71c9c2045cc88f2253603bb7634c2eb523f20dea
refs/heads/master: 7ec24db8dd7eb7e59316552bda92d950e31999d1
15 changes: 4 additions & 11 deletions trunk/drivers/staging/spectra/ffsport.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,19 +227,12 @@ static int ioctl_write_page_data(unsigned long arg)
if (copy_from_user(&info, (void __user *)arg, sizeof(info)))
return -EFAULT;

buf = kmalloc(IdentifyDeviceData.PageDataSize, GFP_ATOMIC);
if (!buf) {
printk(KERN_ERR "ioctl_write_page_data: "
"failed to allocate memory\n");
return -ENOMEM;
}

if (copy_from_user(buf, (void __user *)info.data,
IdentifyDeviceData.PageDataSize)) {
buf = memdup_user((void __user *)info.data,
IdentifyDeviceData.PageDataSize);
if (IS_ERR(buf)) {
printk(KERN_ERR "ioctl_write_page_data: "
"failed to copy user data\n");
kfree(buf);
return -EFAULT;
return PTR_ERR(buf);
}

mutex_lock(&spectra_lock);
Expand Down

0 comments on commit 009072a

Please sign in to comment.