summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/video/tegra/nvmap/nvmap_handle.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/video/tegra/nvmap/nvmap_handle.c b/drivers/video/tegra/nvmap/nvmap_handle.c
index d1d5f267f5c5..1e0ce2c59c17 100644
--- a/drivers/video/tegra/nvmap/nvmap_handle.c
+++ b/drivers/video/tegra/nvmap/nvmap_handle.c
@@ -994,8 +994,9 @@ struct nvmap_handle_ref *nvmap_duplicate_handle_id(struct nvmap_client *client,
clients only if the owner is "videobuf2-dma-nvmap
which is a V4L2 capture kernel module. This handle can
be accessed by the "user" client for rendering/encoding */
- if (!strcmp(((struct nvmap_handle *)id)->owner->name,
- "videobuf2-dma-nvmap"))
+ if (id && ((struct nvmap_handle *)id)->owner &&
+ !strcmp(((struct nvmap_handle *)id)->owner->name,
+ "videobuf2-dma-nvmap"))
client = ((struct nvmap_handle *)id)->owner;
h = nvmap_validate_get(client, id);