]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
fpga: dfl: fme: remove copy_to_user() in ioctl for PR
authorWu Hao <hao.wu@intel.com>
Fri, 28 Jun 2019 00:49:38 +0000 (17:49 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jul 2019 17:58:58 +0000 (19:58 +0200)
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 <yilun.xu@intel.com>
Signed-off-by: Wu Hao <hao.wu@intel.com>
Acked-by: Moritz Fischer <mdf@kernel.org>
Acked-by: Alan Tull <atull@kernel.org>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
Link: https://lore.kernel.org/r/20190628004951.6202-3-mdf@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/fpga/dfl-fme-pr.c

index d9ca9554844abd3386322ba9ce830b2a19017317..6ec0f09e5994a0f3f2e67f5766b34d682a8fd172 100644 (file)
@@ -159,9 +159,6 @@ static int fme_pr(struct platform_device *pdev, unsigned long arg)
        mutex_unlock(&pdata->lock);
 free_exit:
        vfree(buf);
-       if (copy_to_user((void __user *)arg, &port_pr, minsz))
-               return -EFAULT;
-
        return ret;
 }