@@ -855,7 +855,7 @@ static void amdgpu_atombios_fini(struct amdgpu_device *adev)
static int amdgpu_atombios_init(struct amdgpu_device *adev)
{
struct card_info *atom_card_info =
- kzalloc(sizeof(struct card_info), GFP_KERNEL);
+ kzalloc(sizeof(*atom_card_info), GFP_KERNEL);
if (!atom_card_info)
return -ENOMEM;
@@ -1224,7 +1224,8 @@ static int amdgpu_early_init(struct amdgpu_device *adev)
}
adev->ip_block_status = kcalloc(adev->num_ip_blocks,
- sizeof(struct amdgpu_ip_block_status), GFP_KERNEL);
+ sizeof(*adev->ip_block_status),
+ GFP_KERNEL);
if (adev->ip_block_status == NULL)
return -ENOMEM;