drm/amdgpu: fix hive reference leak when reflecting psp topology info
authorJonathan Kim <jonathan.kim@amd.com>
Thu, 28 Jul 2022 16:36:09 +0000 (12:36 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 28 Jul 2022 20:28:54 +0000 (16:28 -0400)
Hives that require psp topology info to be reflected will leak hive
reference so fix it.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Reviewed-by: Shaoyun Liu <shaoyun.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

index 3ee363b..6c23e89 100644 (file)
@@ -1292,6 +1292,8 @@ static void psp_xgmi_reflect_topology_info(struct psp_context *psp,
 
                break;
        }
+
+       amdgpu_put_xgmi_hive(hive);
 }
 
 int psp_xgmi_get_topology_info(struct psp_context *psp,