diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common')
-rw-r--r-- | drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c b/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c index 7a4e7705..c749c729 100644 --- a/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c +++ b/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c | |||
@@ -156,7 +156,8 @@ int __nvgpu_alloc_common_init(struct nvgpu_allocator *a, struct gk20a *g, | |||
156 | a->priv = priv; | 156 | a->priv = priv; |
157 | a->debug = dbg; | 157 | a->debug = dbg; |
158 | 158 | ||
159 | strlcpy(a->name, name, sizeof(a->name)); | 159 | strncpy(a->name, name, sizeof(a->name)); |
160 | a->name[sizeof(a->name) - 1] = 0; | ||
160 | 161 | ||
161 | return 0; | 162 | return 0; |
162 | } | 163 | } |