[14/20] via-pmu: don't bother with access_ok()
diff mbox series

Message ID 20200509234557.1124086-14-viro@ZenIV.linux.org.uk
State New
Headers show
Series
  • [01/20] dlmfs_file_write(): get rid of pointless access_ok()
Related show

Commit Message

Al Viro May 9, 2020, 11:45 p.m. UTC
From: Al Viro <viro@zeniv.linux.org.uk>

we are using copy_to_user() for actual copying

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 drivers/macintosh/via-pmu.c | 2 --
 1 file changed, 2 deletions(-)

Patch
diff mbox series

diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index 83eb05bf85ff..8450d7c008d0 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -2184,8 +2184,6 @@  pmu_read(struct file *file, char __user *buf,
 
 	if (count < 1 || !pp)
 		return -EINVAL;
-	if (!access_ok(buf, count))
-		return -EFAULT;
 
 	spin_lock_irqsave(&pp->lock, flags);
 	add_wait_queue(&pp->wait, &wait);