Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/radeon: use kzalloc for allocating one thing

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

The semantic patch that makes this change is as follows:

// <smpl>
@@
@@

- kcalloc(1,
+ kzalloc(
...)
// </smpl>

Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Reviewed-by: Vaneet Narang <v.narang@samsung.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Maninder Singh and committed by
Alex Deucher
69ee2410 e922cfb1

+1 -1
+1 -1
drivers/gpu/drm/radeon/radeon_ttm.c
··· 719 719 return 0; 720 720 721 721 if (gtt && gtt->userptr) { 722 - ttm->sg = kcalloc(1, sizeof(struct sg_table), GFP_KERNEL); 722 + ttm->sg = kzalloc(sizeof(struct sg_table), GFP_KERNEL); 723 723 if (!ttm->sg) 724 724 return -ENOMEM; 725 725