diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c index 428e5eb3444f..f4c474a95875 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | |||
@@ -310,20 +310,20 @@ static int acp_hw_init(void *handle) | |||
310 | pm_genpd_init(&adev->acp.acp_genpd->gpd, NULL, false); | 310 | pm_genpd_init(&adev->acp.acp_genpd->gpd, NULL, false); |
311 | } | 311 | } |
312 | 312 | ||
313 | adev->acp.acp_cell = kzalloc(sizeof(struct mfd_cell) * ACP_DEVS, | 313 | adev->acp.acp_cell = kcalloc(ACP_DEVS, sizeof(struct mfd_cell), |
314 | GFP_KERNEL); | 314 | GFP_KERNEL); |
315 | 315 | ||
316 | if (adev->acp.acp_cell == NULL) | 316 | if (adev->acp.acp_cell == NULL) |
317 | return -ENOMEM; | 317 | return -ENOMEM; |
318 | 318 | ||
319 | adev->acp.acp_res = kzalloc(sizeof(struct resource) * 4, GFP_KERNEL); | 319 | adev->acp.acp_res = kcalloc(4, sizeof(struct resource), GFP_KERNEL); |
320 | 320 | ||
321 | if (adev->acp.acp_res == NULL) { | 321 | if (adev->acp.acp_res == NULL) { |
322 | kfree(adev->acp.acp_cell); | 322 | kfree(adev->acp.acp_cell); |
323 | return -ENOMEM; | 323 | return -ENOMEM; |
324 | } | 324 | } |
325 | 325 | ||
326 | i2s_pdata = kzalloc(sizeof(struct i2s_platform_data) * 2, GFP_KERNEL); | 326 | i2s_pdata = kcalloc(2, sizeof(struct i2s_platform_data), GFP_KERNEL); |
327 | if (i2s_pdata == NULL) { | 327 | if (i2s_pdata == NULL) { |
328 | kfree(adev->acp.acp_res); | 328 | kfree(adev->acp.acp_res); |
329 | kfree(adev->acp.acp_cell); | 329 | kfree(adev->acp.acp_cell); |