diff options
author | Christian König <christian.koenig@amd.com> | 2017-04-05 11:46:12 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-04-06 13:27:20 -0400 |
commit | 6e3f187cc0b434012fdca272c332b1251ce7f7ff (patch) | |
tree | 9c50dab0fe6b2a0c4423a013f07ebe0e74d8aa63 | |
parent | 8b5de0ebe420aa57f962dcd9777298d3ae55953f (diff) | |
download | linux-6e3f187cc0b434012fdca272c332b1251ce7f7ff.tar.bz2 |
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>
-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, return -EINVAL; if (!adev->irq.client[client_id].sources) { - adev->irq.client[client_id].sources = kcalloc(AMDGPU_MAX_IRQ_SRC_ID, - sizeof(struct amdgpu_irq_src), - GFP_KERNEL); + adev->irq.client[client_id].sources = + kcalloc(AMDGPU_MAX_IRQ_SRC_ID, + sizeof(struct amdgpu_irq_src *), + GFP_KERNEL); if (!adev->irq.client[client_id].sources) return -ENOMEM; } |