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>
This commit is contained in:
Gagan Grover
2015-07-10 13:34:30 +05:30
parent bef2159086
commit d621fe74b9

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* 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)
bool gk20a_fence_is_expired(struct gk20a_fence *f)
{
if (f && f->ops)
return f->ops->is_expired(f);
else
return true;
}
int gk20a_fence_install_fd(struct gk20a_fence *f)