[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230626143331.640454-1-suijingfeng@loongson.cn>
Date: Mon, 26 Jun 2023 22:33:30 +0800
From: Sui Jingfeng <suijingfeng@...ngson.cn>
To: Thierry Reding <thierry.reding@...il.com>,
Mikko Perttunen <mperttunen@...dia.com>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
Jonathan Hunter <jonathanh@...dia.com>
Cc: dri-devel@...ts.freedesktop.org, linux-tegra@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] drm/tegra: Return an error code if fails
Return -ENOMEM if tegra_bo_mmap() fails.
Signed-off-by: Sui Jingfeng <suijingfeng@...ngson.cn>
---
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
Powered by blists - more mailing lists