Commit 195dd40c authored by Sui Jingfeng's avatar Sui Jingfeng Committed by Thierry Reding

drm/tegra: Remove surplus else after return

else is not generally useful after return
Signed-off-by: default avatarSui Jingfeng <suijingfeng@loongson.cn>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230626143331.640454-2-suijingfeng@loongson.cn
parent ff5f9ae9
......@@ -180,15 +180,15 @@ static void *tegra_bo_mmap(struct host1x_bo *bo)
struct iosys_map map;
int ret;
if (obj->vaddr) {
if (obj->vaddr)
return obj->vaddr;
} else if (obj->gem.import_attach) {
if (obj->gem.import_attach) {
ret = dma_buf_vmap_unlocked(obj->gem.import_attach->dmabuf, &map);
return ret ? NULL : map.vaddr;
} else {
return vmap(obj->pages, obj->num_pages, VM_MAP,
pgprot_writecombine(PAGE_KERNEL));
}
return vmap(obj->pages, obj->num_pages, VM_MAP, pgprot_writecombine(PAGE_KERNEL));
}
static void tegra_bo_munmap(struct host1x_bo *bo, void *addr)
......@@ -198,9 +198,10 @@ static void tegra_bo_munmap(struct host1x_bo *bo, void *addr)
if (obj->vaddr)
return;
else if (obj->gem.import_attach)
dma_buf_vunmap_unlocked(obj->gem.import_attach->dmabuf, &map);
else
if (obj->gem.import_attach)
return dma_buf_vunmap_unlocked(obj->gem.import_attach->dmabuf, &map);
vunmap(addr);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment