aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/nvram.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2020-04-22 21:52:17 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2020-05-29 11:03:30 -0400
commit558cc8f7822ba25711142f5e7718be857b286793 (patch)
treea8ed64e09ca72fc5f594b0be023c48f6fc566aef /drivers/char/nvram.c
parentn_hdlc_tty_read(): remove pointless access_ok() (diff)
downloadlinux-dev-558cc8f7822ba25711142f5e7718be857b286793.tar.xz
linux-dev-558cc8f7822ba25711142f5e7718be857b286793.zip
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>
Diffstat (limited to 'drivers/char/nvram.c')
-rw-r--r--drivers/char/nvram.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c
index 4667844eee69..8206412d25ba 100644
--- a/drivers/char/nvram.c
+++ b/drivers/char/nvram.c
@@ -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;