diff options
| author | Christian König <[email protected]> | 2017-04-05 09:46:12 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2017-04-06 17:27:20 +0000 |
| commit | 6e3f187cc0b434012fdca272c332b1251ce7f7ff (patch) | |
| tree | 9c50dab0fe6b2a0c4423a013f07ebe0e74d8aa63 /drivers/gpu/drm/amd/amdgpu | |
| parent | drm/amd/amdgpu: Clean up psp reload_quirk() (diff) | |
| download | kernel-6e3f187cc0b434012fdca272c332b1251ce7f7ff.tar.gz kernel-6e3f187cc0b434012fdca272c332b1251ce7f7ff.zip | |
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 <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
| -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; } |
