video: tegra: nvmap: Replace IS_ERR with IS_ERR_OR_NULL

-  Replace IS_ERR with IS_ERR_OR_NULL as the pointer is getting
derefrenced. Derefrencing a null pointer can lead to errors.

JIRA: TMM-5724
Bug 4479044

Change-Id: Ia432dc4bd4b7b5db89548c99b9873c3f34471ae4
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261658
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
This commit is contained in:
Surbhi Singh
2024-12-04 10:21:00 +00:00
committed by Jon Hunter
parent f666d39d4d
commit df3b6e37ff

View File

@@ -366,7 +366,7 @@ unlock:
atomic_read(&h->ref),
is_ro ? "RO" : "RW");
if (!IS_ERR(ref))
if (!IS_ERR_OR_NULL(ref))
atomic_dec(&ref->dupes);
}