summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/nvmap/nvmap_ioctl.c
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2014-02-06 19:35:21 +0530
committerSachin Nikam <snikam@nvidia.com>2014-02-06 23:04:19 -0800
commitcae32e1ec02745ae64381822206c823e1d48f93b (patch)
treea3ec3cf2d6a93c04ad5eea285d393974461acf30 /drivers/video/tegra/nvmap/nvmap_ioctl.c
parent6271e01ff7f4832e2acb3f8ebedf10c76165918e (diff)
video: tegra: nvmap: fix dereference before null check
Coverity id : 25526 Change-Id: I99c72db80445f2ddecdda563df048883ef1df31c Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/364416 GVS: Gerrit_Virtual_Submit Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/nvmap/nvmap_ioctl.c')
-rw-r--r--drivers/video/tegra/nvmap/nvmap_ioctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/tegra/nvmap/nvmap_ioctl.c b/drivers/video/tegra/nvmap/nvmap_ioctl.c
index b72709e35940..0d0d87580574 100644
--- a/drivers/video/tegra/nvmap/nvmap_ioctl.c
+++ b/drivers/video/tegra/nvmap/nvmap_ioctl.c
@@ -863,12 +863,13 @@ static int do_cache_maint(struct cache_maint_op *cache_work)
phys_addr_t loop;
int err = 0;
struct nvmap_handle *h = cache_work->h;
- struct nvmap_client *client = h->owner;
+ struct nvmap_client *client;
unsigned int op = cache_work->op;
if (!h || !h->alloc)
return -EFAULT;
+ client = h->owner;
if (client)
trace_cache_maint(client, h, pstart, pend, op);
wmb();