Return -ENOMEM if tegra_bo_mmap() fails. Signed-off-by: Sui Jingfeng <suijingfeng@xxxxxxxxxxx> --- drivers/gpu/drm/tegra/gem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c index dea38892d6e6..0ce22935fbd3 100644 --- a/drivers/gpu/drm/tegra/gem.c +++ b/drivers/gpu/drm/tegra/gem.c @@ -710,6 +710,8 @@ static int tegra_gem_prime_vmap(struct dma_buf *buf, struct iosys_map *map) void *vaddr; vaddr = tegra_bo_mmap(&bo->base); + if (!vaddr) + return -ENOMEM; if (IS_ERR(vaddr)) return PTR_ERR(vaddr); -- 2.25.1