Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e3f187c authored by Christian König's avatar Christian König Committed by Alex Deucher
Browse files

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: default avatarChristian König <christian.koenig@amd.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 8b5de0eb
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -316,8 +316,9 @@ 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),
		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;