[<prev] [next>] [day] [month] [year] [list]
Message-ID: <b311c5e2-ae9a-4558-a51a-a332d0fdfd9b@moroto.mountain>
Date: Fri, 12 Jan 2024 17:30:00 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Yang Wang <kevinyang.wang@....com>
Cc: Alex Deucher <alexander.deucher@....com>,
Christian König <christian.koenig@....com>,
"Pan, Xinhui" <Xinhui.Pan@....com>,
David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>,
Hawking Zhang <Hawking.Zhang@....com>,
amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [PATCH] drm/amdgpu: fix return value in aca_bank_hwip_is_matched()
The aca_bank_hwip_is_matched() function is type bool. This error path
return -EINVAL which is cast to true, but it should return false
instead.
Fixes: 22a4fa4709e3 ("drm/amdgpu: implement RAS ACA driver framework")
Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c
index 6074a529caf7..1d3ae7c241e5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c
@@ -182,7 +182,7 @@ static bool aca_bank_hwip_is_matched(struct aca_bank *bank, enum aca_hwip_type t
u64 ipid;
if (!bank || type == ACA_HWIP_TYPE_UNKNOW)
- return -EINVAL;
+ return false;
hwip = &aca_hwid_mcatypes[type];
if (!hwip->hwid)
--
2.43.0
Powered by blists - more mailing lists