diff options
author | Gagan Grover <ggrover@nvidia.com> | 2015-07-10 04:04:30 -0400 |
---|---|---|
committer | Gagan Grover <ggrover@nvidia.com> | 2015-09-29 06:07:41 -0400 |
commit | d621fe74b9ac0c27c0850df8e9a1e3721f61c1a8 (patch) | |
tree | d95b102c8e70466ff957b0adbfd39012f94269a7 /drivers/gpu/nvgpu | |
parent | bef2159086a3db04a53cdb28f163c3158f0a8b57 (diff) |
gpu: nvgpu: Handling null pointer
Handling null pointer in gk20a_fence_is_expired.
Bug 200117724
Change-Id: I0f9307a5f8b82bf990b6ddaea1a408d4f3f376fb
Signed-off-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-on: http://git-master/r/777796
(cherry picked from commit dbf5bae53e0e7862754faba78eab84284786ecb3)
Reviewed-on: http://git-master/r/795356
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fence_gk20a.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c index def916b3..54a288cd 100644 --- a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms and conditions of the GNU General Public License, | 5 | * under the terms and conditions of the GNU General Public License, |
@@ -71,7 +71,10 @@ int gk20a_fence_wait(struct gk20a_fence *f, int timeout) | |||
71 | 71 | ||
72 | bool gk20a_fence_is_expired(struct gk20a_fence *f) | 72 | bool gk20a_fence_is_expired(struct gk20a_fence *f) |
73 | { | 73 | { |
74 | return f->ops->is_expired(f); | 74 | if (f && f->ops) |
75 | return f->ops->is_expired(f); | ||
76 | else | ||
77 | return true; | ||
75 | } | 78 | } |
76 | 79 | ||
77 | int gk20a_fence_install_fd(struct gk20a_fence *f) | 80 | int gk20a_fence_install_fd(struct gk20a_fence *f) |