6.8-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ma Jun <Jun.Ma2@xxxxxxx> commit 0e95ed6452cb079cf9587c774a475a7d83c7e040 upstream. gpu_od should be removed if it's an empty directory Signed-off-by: Ma Jun <Jun.Ma2@xxxxxxx> Reported-by: Yang Wang <kevinyang.wang@xxxxxxx> Reviewed-by: Yang Wang <kevinyang.wang@xxxxxxx> Suggested-by: Lijo Lazar <lijo.lazar@xxxxxxx> Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx> Cc: stable@xxxxxxxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- 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: