2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-15 00:34:10 +08:00

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

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;