From 49ec630cd5e497c97c6a8a0fc4df5b2c88ca11c6 Mon Sep 17 00:00:00 2001 From: Wu Hao Date: Thu, 27 Jun 2019 17:49:38 -0700 Subject: fpga: dfl: fme: remove copy_to_user() in ioctl for PR This patch removes copy_to_user() code in partial reconfiguration ioctl, as it's useless as user never needs to read the data structure after ioctl. Signed-off-by: Xu Yilun Signed-off-by: Wu Hao Acked-by: Moritz Fischer Acked-by: Alan Tull Signed-off-by: Moritz Fischer Link: https://lore.kernel.org/r/20190628004951.6202-3-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/fpga/dfl-fme-pr.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers/fpga') diff --git a/drivers/fpga/dfl-fme-pr.c b/drivers/fpga/dfl-fme-pr.c index d9ca9554844a..6ec0f09e5994 100644 --- a/drivers/fpga/dfl-fme-pr.c +++ b/drivers/fpga/dfl-fme-pr.c @@ -159,9 +159,6 @@ unlock_exit: mutex_unlock(&pdata->lock); free_exit: vfree(buf); - if (copy_to_user((void __user *)arg, &port_pr, minsz)) - return -EFAULT; - return ret; } -- cgit v1.2.3