Commit 0e95ed64 authored by Ma Jun's avatar Ma Jun Committed by Alex Deucher

drm/amdgpu/pm: Remove gpu_od if it's an empty directory

gpu_od should be removed if it's an empty directory
Signed-off-by: default avatarMa Jun <Jun.Ma2@amd.com>
Reported-by: default avatarYang Wang <kevinyang.wang@amd.com>
Reviewed-by: default avatarYang Wang <kevinyang.wang@amd.com>
Suggested-by: default avatarLijo Lazar <lijo.lazar@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
parent 9c783a11
......@@ -4261,6 +4261,13 @@ static int amdgpu_od_set_init(struct amdgpu_device *adev)
}
}
/*
* 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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment