summaryrefslogtreecommitdiff
path: root/drivers/platform/goldfish/goldfish_pipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform/goldfish/goldfish_pipe.c')
-rw-r--r--drivers/platform/goldfish/goldfish_pipe.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c
index 7c639006252e..321bc673c417 100644
--- a/drivers/platform/goldfish/goldfish_pipe.c
+++ b/drivers/platform/goldfish/goldfish_pipe.c
@@ -416,8 +416,7 @@ static ssize_t goldfish_pipe_read_write(struct file *filp,
if (unlikely(bufflen == 0))
return 0;
/* Check the buffer range for access */
- if (unlikely(!access_ok(is_write ? VERIFY_WRITE : VERIFY_READ,
- buffer, bufflen)))
+ if (unlikely(!access_ok(buffer, bufflen)))
return -EFAULT;
address = (unsigned long)buffer;