diff options
| author | Alex Deucher <[email protected]> | 2015-06-26 17:02:57 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2015-06-29 15:21:52 +0000 |
| commit | d8d090b711bc56e095e59f9b536ed3c73c47b36d (patch) | |
| tree | 9b236de7f5be2d862c8fcc660dbb15c36c6646e8 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
| parent | drm/amdgpu: remove unnecessary check before kfree (diff) | |
| download | kernel-d8d090b711bc56e095e59f9b536ed3c73c47b36d.tar.gz kernel-d8d090b711bc56e095e59f9b536ed3c73c47b36d.zip | |
drm/amdgpu: allocate ip_block_enabled memory in common code
Remove duplication across asic families and make it symmetric
with the freeing of the code in amdgpu_device.c
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index a85cd08901a7..e19097554093 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -1191,7 +1191,9 @@ static int amdgpu_early_init(struct amdgpu_device *adev) return -EINVAL; } - + adev->ip_block_enabled = kcalloc(adev->num_ip_blocks, sizeof(bool), GFP_KERNEL); + if (adev->ip_block_enabled == NULL) + return -ENOMEM; if (adev->ip_blocks == NULL) { DRM_ERROR("No IP blocks found!\n"); |
