nvram: drop useless access_ok()

we are using copy_to_user()/memdup_user() anyway

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2020-04-22 21:52:17 -04:00
parent 1a4b8febb6
commit 558cc8f782
1 changed files with 0 additions and 4 deletions

View File

@ -232,8 +232,6 @@ static ssize_t nvram_misc_read(struct file *file, char __user *buf,
ssize_t ret;
if (!access_ok(buf, count))
return -EFAULT;
if (*ppos >= nvram_size)
return 0;
@ -264,8 +262,6 @@ static ssize_t nvram_misc_write(struct file *file, const char __user *buf,
char *tmp;
ssize_t ret;
if (!access_ok(buf, count))
return -EFAULT;
if (*ppos >= nvram_size)
return 0;