6.8-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ma Jun Jun.Ma2@amd.com
commit 0e95ed6452cb079cf9587c774a475a7d83c7e040 upstream.
gpu_od should be removed if it's an empty directory
Signed-off-by: Ma Jun Jun.Ma2@amd.com Reported-by: Yang Wang kevinyang.wang@amd.com Reviewed-by: Yang Wang kevinyang.wang@amd.com Suggested-by: Lijo Lazar lijo.lazar@amd.com Signed-off-by: Alex Deucher alexander.deucher@amd.com Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 7 +++++++ 1 file changed, 7 insertions(+)
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c @@ -4217,6 +4217,13 @@ static int amdgpu_od_set_init(struct amd } }
+ /* + * If gpu_od is the only member in the list, that means gpu_od is an + * empty directory, so remove it. + */ + if (list_is_singular(&adev->pm.od_kobj_list)) + goto err_out; + return 0;
err_out: