diff options
Diffstat (limited to 'drivers/fpga/dfl-fme-pr.c')
-rw-r--r-- | drivers/fpga/dfl-fme-pr.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/fpga/dfl-fme-pr.c b/drivers/fpga/dfl-fme-pr.c index 0b840531ef33..d9ca9554844a 100644 --- a/drivers/fpga/dfl-fme-pr.c +++ b/drivers/fpga/dfl-fme-pr.c @@ -99,8 +99,7 @@ static int fme_pr(struct platform_device *pdev, unsigned long arg) return -EINVAL; } - if (!access_ok(VERIFY_READ, - (void __user *)(unsigned long)port_pr.buffer_address, + if (!access_ok((void __user *)(unsigned long)port_pr.buffer_address, port_pr.buffer_size)) return -EFAULT; @@ -444,10 +443,8 @@ static void pr_mgmt_uinit(struct platform_device *pdev, struct dfl_feature *feature) { struct dfl_feature_platform_data *pdata = dev_get_platdata(&pdev->dev); - struct dfl_fme *priv; mutex_lock(&pdata->lock); - priv = dfl_fpga_pdata_get_private(pdata); dfl_fme_destroy_regions(pdata); dfl_fme_destroy_bridges(pdata); |