summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c')
-rw-r--r--drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c b/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c
index bf624162..68d68ad6 100644
--- a/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c
+++ b/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c
@@ -45,10 +45,10 @@ u64 nvgpu_alloc_base(struct nvgpu_allocator *a)
45 return 0; 45 return 0;
46} 46}
47 47
48u64 nvgpu_alloc_initialized(struct nvgpu_allocator *a) 48bool nvgpu_alloc_initialized(struct nvgpu_allocator *a)
49{ 49{
50 if (!a->ops || !a->ops->inited) { 50 if (a->ops == NULL || a->ops->inited == NULL) {
51 return 0; 51 return false;
52 } 52 }
53 53
54 return a->ops->inited(a); 54 return a->ops->inited(a);
@@ -151,7 +151,7 @@ int nvgpu_alloc_common_init(struct nvgpu_allocator *a, struct gk20a *g,
151{ 151{
152 int err; 152 int err;
153 153
154 if (!ops) { 154 if (ops == NULL) {
155 return -EINVAL; 155 return -EINVAL;
156 } 156 }
157 157
@@ -159,7 +159,7 @@ int nvgpu_alloc_common_init(struct nvgpu_allocator *a, struct gk20a *g,
159 * This is the bare minimum operations required for a sensible 159 * This is the bare minimum operations required for a sensible
160 * allocator. 160 * allocator.
161 */ 161 */
162 if (!ops->alloc || !ops->free || !ops->fini) { 162 if (ops->alloc == NULL || ops->free == NULL || ops->fini == NULL) {
163 return -EINVAL; 163 return -EINVAL;
164 } 164 }
165 165