uacce: delete some redundant code.
authorKai Ye <yekai13@huawei.com>
Mon, 2 Nov 2020 09:39:24 +0000 (17:39 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Nov 2020 17:41:03 +0000 (18:41 +0100)
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.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/uacce/uacce.c

index 56dd98a..eb827f1 100644 (file)
@@ -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;