Skip to contentSkip to conversation

drm/amdgpu: simplify cper ring fini condition

PATCH New Min, Frank 1 participant 1 message Jul 31 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Min, Frank

author
#1 lore raw

PATCH 1/1 drm/amdgpu: simplify cper ring fini condition

AMD General

From: Frank Min <[email protected]>

To avoid cper ring init and fini with different condition and causing kernel memory leak.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c +1 -2
index d5e59c24d907d..e94862f90cc7c 100644
@@ -612,7 +612,7 @@ int amdgpu_cper_init(struct amdgpu_device *adev)
 
 int amdgpu_cper_fini(struct amdgpu_device *adev)  {
-       if (!amdgpu_aca_is_enabled(adev) && !amdgpu_sriov_ras_cper_en(adev))
+       if (!adev->cper.enabled)
                return 0;
 
        adev->cper.enabled = false;
--

2.43.0