Explorar o código

drm/amdgpu: use kzalloc for allocating one thing

Use kzalloc rather than kcalloc(1.. for allocating
one thing.

Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Reviewed-by: Vaneet Narang <v.narang@samsung.com>
Reviewed-by: Christian Konig <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Maninder Singh %!s(int64=10) %!d(string=hai) anos
pai
achega
5f0b34cc72
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

+ 1 - 1
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

@@ -674,7 +674,7 @@ static int amdgpu_ttm_tt_populate(struct ttm_tt *ttm)
 		return 0;
 
 	if (gtt && gtt->userptr) {
-		ttm->sg = kcalloc(1, sizeof(struct sg_table), GFP_KERNEL);
+		ttm->sg = kzalloc(sizeof(struct sg_table), GFP_KERNEL);
 		if (!ttm->sg)
 			return -ENOMEM;