[PATCH] drm/amdgpu: fix over allocating of IRQ sources

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 5, 2017 at 5:47 AM, Christian König <deathsimple at vodafone.de> wrote:
> From: Christian König <christian.koenig at amd.com>
>
> We need an array of pointers to IRQ sources, not an array of sources.
>
> Signed-off-by: Christian König <christian.koenig at amd.com>
> Reported-by: Dan Carpenter <dan.carpenter at oracle.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 7 ++++---
>  1 file 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 1309886..f8a6c95 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> @@ -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
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux