diff options
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/kmem.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/kmem.c b/drivers/gpu/nvgpu/common/linux/kmem.c index a492fb35..10946a08 100644 --- a/drivers/gpu/nvgpu/common/linux/kmem.c +++ b/drivers/gpu/nvgpu/common/linux/kmem.c | |||
@@ -63,10 +63,10 @@ void nvgpu_big_free(struct gk20a *g, void *p) | |||
63 | * nvgpu_big_[mz]alloc() will need to remember the size of the alloc | 63 | * nvgpu_big_[mz]alloc() will need to remember the size of the alloc |
64 | * when freeing. | 64 | * when freeing. |
65 | */ | 65 | */ |
66 | if (virt_addr_valid(p)) | 66 | if (is_vmalloc_addr(p)) |
67 | nvgpu_kfree(g, p); | ||
68 | else | ||
69 | nvgpu_vfree(g, p); | 67 | nvgpu_vfree(g, p); |
68 | else | ||
69 | nvgpu_kfree(g, p); | ||
70 | } | 70 | } |
71 | 71 | ||
72 | void *__nvgpu_kmalloc(struct gk20a *g, size_t size, unsigned long ip) | 72 | void *__nvgpu_kmalloc(struct gk20a *g, size_t size, unsigned long ip) |