treewide: kmalloc() -> kmalloc_array()
[linux-block.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_amdkfd_gfx_v9.c
index f0c0d3953f6989496a6beab4da5053808892dd4e..1db60aa5b7f0eab0c012cc41af2181bb678a7813 100644 (file)
@@ -504,7 +504,7 @@ static int kgd_hqd_dump(struct kgd_dev *kgd,
                (*dump)[i++][1] = RREG32(addr);         \
        } while (0)
 
-       *dump = kmalloc(HQD_N_REGS*2*sizeof(uint32_t), GFP_KERNEL);
+       *dump = kmalloc_array(HQD_N_REGS * 2, sizeof(uint32_t), GFP_KERNEL);
        if (*dump == NULL)
                return -ENOMEM;
 
@@ -606,7 +606,7 @@ static int kgd_hqd_sdma_dump(struct kgd_dev *kgd,
 #undef HQD_N_REGS
 #define HQD_N_REGS (19+6+7+10)
 
-       *dump = kmalloc(HQD_N_REGS*2*sizeof(uint32_t), GFP_KERNEL);
+       *dump = kmalloc_array(HQD_N_REGS * 2, sizeof(uint32_t), GFP_KERNEL);
        if (*dump == NULL)
                return -ENOMEM;