@@ -363,7 +363,6 @@ int exynos_drm_gem_dumb_create(struct drm_file *file_priv,
static int exynos_drm_gem_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma)
{
struct exynos_drm_gem *exynos_gem = to_exynos_gem(obj);
- int ret;
if (obj->import_attach)
return dma_buf_mmap(obj->dma_buf, vma, 0);
@@ -383,16 +382,7 @@ static int exynos_drm_gem_mmap(struct drm_gem_object *obj, struct vm_area_struct
vma->vm_page_prot =
pgprot_noncached(vm_get_page_prot(vma->vm_flags));
- ret = exynos_drm_gem_mmap_buffer(exynos_gem, vma);
- if (ret)
- goto err_close_vm;
-
- return ret;
-
-err_close_vm:
- drm_gem_vm_close(vma);
-
- return ret;
+ return exynos_drm_gem_mmap_buffer(exynos_gem, vma);
}
/* low-level interface prime helpers */