
From: Kai Ye <yekai13@huawei.com> mainline inclusion from mainline-v5.11-rc1 commit a67c43ac37f80b5e7e1876e8f5f7df62027445c8 category: bugfix bugzilla: 173981 CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i... ---------------------------------------------------------------------- Delete some redundant code. Reviewed-by: Zhou Wang <wangzhou1@hisilicon.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@Huawei.com> Acked-by: Zhangfei Gao <zhangfei.gao@linaro.org> Signed-off-by: Kai Ye <yekai13@huawei.com> Link: https://lore.kernel.org/r/1604309965-21752-2-git-send-email-yekai13@huawei.c... Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Mingqiang Ling <lingmingqiang@huawei.com> Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com> --- drivers/misc/uacce/uacce.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c index d3ff3c318c5b..5996e68b223b 100644 --- a/drivers/misc/uacce/uacce.c +++ b/drivers/misc/uacce/uacce.c @@ -231,17 +231,6 @@ static int uacce_fops_mmap(struct file *filep, struct vm_area_struct *vma) switch (type) { case UACCE_QFRT_MMIO: - if (!uacce->ops->mmap) { - ret = -EINVAL; - goto out_with_lock; - } - - ret = uacce->ops->mmap(q, vma, qfr); - if (ret) - goto out_with_lock; - - break; - case UACCE_QFRT_DUS: if (!uacce->ops->mmap) { ret = -EINVAL; -- 2.20.1