summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/tegra/nvmap/nvmap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/tegra/nvmap/nvmap.c b/drivers/video/tegra/nvmap/nvmap.c
index 16eeeb2638d5..09f436102c6b 100644
--- a/drivers/video/tegra/nvmap/nvmap.c
+++ b/drivers/video/tegra/nvmap/nvmap.c
@@ -265,6 +265,9 @@ void *__nvmap_mmap(struct nvmap_handle *h)
if (!h)
return NULL;
+ if (!h->alloc)
+ return NULL;
+
prot = nvmap_pgprot(h, PG_PROT_KERNEL);
if (h->heap_pgalloc) {