From 169a233f4779a7617179f825723d38f9832238f8 Mon Sep 17 00:00:00 2001 From: Mariusz Glebocki Date: Thu, 9 Oct 2014 16:28:12 +0200 Subject: video: tegra: nvmap: prevent null pointer dereference --- drivers/video/tegra/nvmap/nvmap_dev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/tegra/nvmap/nvmap_dev.c b/drivers/video/tegra/nvmap/nvmap_dev.c index 3ea7bd2ea797..40a9e5b9f2ed 100644 --- a/drivers/video/tegra/nvmap/nvmap_dev.c +++ b/drivers/video/tegra/nvmap/nvmap_dev.c @@ -236,8 +236,9 @@ struct nvmap_handle *nvmap_get_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 */ - if (!strcmp(((struct nvmap_handle *)id)->owner->name, - "videobuf2-dma-nvmap")) + if (((struct nvmap_handle *)id)->owner && + !strcmp(((struct nvmap_handle *)id)->owner->name, + "videobuf2-dma-nvmap")) client = ((struct nvmap_handle *)id)->owner; nvmap_ref_lock(client); -- cgit v1.2.3