diff options
author | Christian König <christian.koenig@amd.com> | 2017-04-05 05:46:12 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-04-06 13:27:20 -0400 |
commit | 6e3f187cc0b434012fdca272c332b1251ce7f7ff (patch) | |
tree | 9c50dab0fe6b2a0c4423a013f07ebe0e74d8aa63 /drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | |
parent | 8b5de0ebe420aa57f962dcd9777298d3ae55953f (diff) |
drm/amdgpu: fix over allocating of IRQ sources
We need an array of pointers to IRQ sources, not an array of sources.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c index 13b487235a8b..a6b7e367a860 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | |||
@@ -316,9 +316,10 @@ int amdgpu_irq_add_id(struct amdgpu_device *adev, | |||
316 | return -EINVAL; | 316 | return -EINVAL; |
317 | 317 | ||
318 | if (!adev->irq.client[client_id].sources) { | 318 | if (!adev->irq.client[client_id].sources) { |
319 | adev->irq.client[client_id].sources = kcalloc(AMDGPU_MAX_IRQ_SRC_ID, | 319 | adev->irq.client[client_id].sources = |
320 | sizeof(struct amdgpu_irq_src), | 320 | kcalloc(AMDGPU_MAX_IRQ_SRC_ID, |
321 | GFP_KERNEL); | 321 | sizeof(struct amdgpu_irq_src *), |
322 | GFP_KERNEL); | ||
322 | if (!adev->irq.client[client_id].sources) | 323 | if (!adev->irq.client[client_id].sources) |
323 | return -ENOMEM; | 324 | return -ENOMEM; |
324 | } | 325 | } |