Browse Source

adb: get rid of pointless access_ok()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro 8 years ago
parent
commit
5a5011936e
1 changed files with 0 additions and 4 deletions
  1. 0 4
      drivers/macintosh/adb.c

+ 0 - 4
drivers/macintosh/adb.c

@@ -723,8 +723,6 @@ static ssize_t adb_read(struct file *file, char __user *buf,
 		return -EINVAL;
 		return -EINVAL;
 	if (count > sizeof(req->reply))
 	if (count > sizeof(req->reply))
 		count = sizeof(req->reply);
 		count = sizeof(req->reply);
-	if (!access_ok(VERIFY_WRITE, buf, count))
-		return -EFAULT;
 
 
 	req = NULL;
 	req = NULL;
 	spin_lock_irqsave(&state->lock, flags);
 	spin_lock_irqsave(&state->lock, flags);
@@ -781,8 +779,6 @@ static ssize_t adb_write(struct file *file, const char __user *buf,
 		return -EINVAL;
 		return -EINVAL;
 	if (adb_controller == NULL)
 	if (adb_controller == NULL)
 		return -ENXIO;
 		return -ENXIO;
-	if (!access_ok(VERIFY_READ, buf, count))
-		return -EFAULT;
 
 
 	req = kmalloc(sizeof(struct adb_request),
 	req = kmalloc(sizeof(struct adb_request),
 					     GFP_KERNEL);
 					     GFP_KERNEL);