]> git.hungrycats.org Git - linux/commit
drm/amdkfd: Use kvcalloc to allocate arrays
authorDavid Francis <David.Francis@amd.com>
Thu, 25 Jun 2026 14:09:13 +0000 (10:09 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Jul 2026 15:43:50 +0000 (11:43 -0400)
commit60b048c93f7a3add39757ad65fe2bb6e58eeae23
treee1f2820e3ce41370b6b5403f0e9bee380cca9682
parentceac787584225883e590b8141503f54c28c2e2cf
drm/amdkfd: Use kvcalloc to allocate arrays

There were a few instances in kfd_chardev.c of kvzalloc being
used to allocate memory for an array.

Switch those to kvcalloc, which
- is the standard way of allocating a zero-initialized array
- does a check for the mul overflowing

Signed-off-by: David Francis <David.Francis@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c