aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/mem.c')
-rw-r--r--drivers/char/mem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index 7b4e4de778e4..b08dc50f9f26 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -609,7 +609,7 @@ static ssize_t read_port(struct file *file, char __user *buf,
609 unsigned long i = *ppos; 609 unsigned long i = *ppos;
610 char __user *tmp = buf; 610 char __user *tmp = buf;
611 611
612 if (!access_ok(VERIFY_WRITE, buf, count)) 612 if (!access_ok(buf, count))
613 return -EFAULT; 613 return -EFAULT;
614 while (count-- > 0 && i < 65536) { 614 while (count-- > 0 && i < 65536) {
615 if (__put_user(inb(i), tmp) < 0) 615 if (__put_user(inb(i), tmp) < 0)
@@ -627,7 +627,7 @@ static ssize_t write_port(struct file *file, const char __user *buf,
627 unsigned long i = *ppos; 627 unsigned long i = *ppos;
628 const char __user *tmp = buf; 628 const char __user *tmp = buf;
629 629
630 if (!access_ok(VERIFY_READ, buf, count)) 630 if (!access_ok(buf, count))
631 return -EFAULT; 631 return -EFAULT;
632 while (count-- > 0 && i < 65536) { 632 while (count-- > 0 && i < 65536) {
633 char c; 633 char c;