drm/amdgpu: fix over allocating of IRQ sources
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix over allocating of IRQ sources
From: Christian König <[email protected]>
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]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +4 -3
@@ -327,9 +327,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 ; }
Signature · 6 lines
2.5.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1491385632-20127-1-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org
Alex Deucher
Reviewed-byQuoted 6 lines · Christian König
From: Christian König <[email protected]>
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]>
Quoted 25 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +4
-4@@ -327,9 +327,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 ; } --2.5.0
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx