summaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/adb.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-06-03 21:50:46 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2017-06-04 13:57:24 -0400
commit5a5011936ec0ef22e9433cf2ee3520db4993b445 (patch)
tree8589b4dd00e61ab4299c33ed1df31194e9cca32c /drivers/macintosh/adb.c
parent31acd2665b8f45548e1acfb9131657646333f91c (diff)
downloadlinux-stable-5a5011936ec0ef22e9433cf2ee3520db4993b445.tar.gz
linux-stable-5a5011936ec0ef22e9433cf2ee3520db4993b445.tar.bz2
linux-stable-5a5011936ec0ef22e9433cf2ee3520db4993b445.zip
adb: get rid of pointless access_ok()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/macintosh/adb.c')
-rw-r--r--drivers/macintosh/adb.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c
index fee939efc4fc..039dc8285fc5 100644
--- a/drivers/macintosh/adb.c
+++ b/drivers/macintosh/adb.c
@@ -723,8 +723,6 @@ static ssize_t adb_read(struct file *file, char __user *buf,
return -EINVAL;
if (count > sizeof(req->reply))
count = sizeof(req->reply);
- if (!access_ok(VERIFY_WRITE, buf, count))
- return -EFAULT;
req = NULL;
spin_lock_irqsave(&state->lock, flags);
@@ -781,8 +779,6 @@ static ssize_t adb_write(struct file *file, const char __user *buf,
return -EINVAL;
if (adb_controller == NULL)
return -ENXIO;
- if (!access_ok(VERIFY_READ, buf, count))
- return -EFAULT;
req = kmalloc(sizeof(struct adb_request),
GFP_KERNEL);