summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2024-04-28 15:57:00 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-07-27 10:46:15 +0200
commit544fa213f15d27f0370795845d55eeb3e00080d2 (patch)
tree6d3617366ee27c774ac27befe826ce7531fd3268
parentb0f9232616477d0e9fc93a735b924f9b3bc12591 (diff)
downloadlinux-544fa213f15d27f0370795845d55eeb3e00080d2.tar.gz
linux-544fa213f15d27f0370795845d55eeb3e00080d2.tar.bz2
linux-544fa213f15d27f0370795845d55eeb3e00080d2.zip
drm/amdgpu: Fix signedness bug in sdma_v4_0_process_trap_irq()
commit 6769a23697f17f9bf9365ca8ed62fe37e361a05a upstream. The "instance" variable needs to be signed for the error handling to work. Fixes: 8b2faf1a4f3b ("drm/amdgpu: add error handle to avoid out-of-bounds") Reviewed-by: Bob Zhou <bob.zhou@amd.com> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: Siddh Raman Pant <siddh.raman.pant@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
index c189e7ae6838..a3352b98ced1 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
@@ -2148,7 +2148,7 @@ static int sdma_v4_0_process_trap_irq(struct amdgpu_device *adev,
struct amdgpu_irq_src *source,
struct amdgpu_iv_entry *entry)
{
- uint32_t instance;
+ int instance;
DRM_DEBUG("IH: SDMA trap\n");
instance = sdma_v4_0_irq_id_to_seq(entry->client_id);