* [PATCH] drm/amd/pm: fix missing device_attr cleanup in amdgpu_pm_sysfs_init()
@ 2025-10-30 5:11 Yang Wang
2025-10-30 5:21 ` Lazar, Lijo
0 siblings, 1 reply; 2+ messages in thread
From: Yang Wang @ 2025-10-30 5:11 UTC (permalink / raw)
To: amd-gfx; +Cc: hawking.zhang, alexander.deucher
Use the correct label to complete all cleanup work.
Fixes: 4d154b1ca580f ("drm/amd/pm: Add support for DPM policies")
Fixes: d2e690ff5d3cf ("drm/amd/pm: Add temperature metrics sysfs entry")
Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
---
drivers/gpu/drm/amd/pm/amdgpu_pm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index 3ce9b862e6ed..f9edb80133dc 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@ -4739,14 +4739,14 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)
ret = devm_device_add_group(adev->dev,
&amdgpu_pm_policy_attr_group);
if (ret)
- goto err_out0;
+ goto err_out1;
}
if (amdgpu_dpm_is_temp_metrics_supported(adev, SMU_TEMP_METRIC_GPUBOARD)) {
ret = devm_device_add_group(adev->dev,
&amdgpu_board_attr_group);
if (ret)
- goto err_out0;
+ goto err_out1;
if (amdgpu_pm_get_sensor_generic(adev, AMDGPU_PP_SENSOR_MAXNODEPOWERLIMIT,
(void *)&tmp) != -EOPNOTSUPP) {
sysfs_add_file_to_group(&adev->dev->kobj,
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] drm/amd/pm: fix missing device_attr cleanup in amdgpu_pm_sysfs_init()
2025-10-30 5:11 [PATCH] drm/amd/pm: fix missing device_attr cleanup in amdgpu_pm_sysfs_init() Yang Wang
@ 2025-10-30 5:21 ` Lazar, Lijo
0 siblings, 0 replies; 2+ messages in thread
From: Lazar, Lijo @ 2025-10-30 5:21 UTC (permalink / raw)
To: Yang Wang, amd-gfx; +Cc: hawking.zhang, alexander.deucher
On 10/30/2025 10:41 AM, Yang Wang wrote:
> Use the correct label to complete all cleanup work.
>
> Fixes: 4d154b1ca580f ("drm/amd/pm: Add support for DPM policies")
> Fixes: d2e690ff5d3cf ("drm/amd/pm: Add temperature metrics sysfs entry")
>
> Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Thanks,
Lijo
> ---
> drivers/gpu/drm/amd/pm/amdgpu_pm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> index 3ce9b862e6ed..f9edb80133dc 100644
> --- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> +++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> @@ -4739,14 +4739,14 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)
> ret = devm_device_add_group(adev->dev,
> &amdgpu_pm_policy_attr_group);
> if (ret)
> - goto err_out0;
> + goto err_out1;
> }
>
> if (amdgpu_dpm_is_temp_metrics_supported(adev, SMU_TEMP_METRIC_GPUBOARD)) {
> ret = devm_device_add_group(adev->dev,
> &amdgpu_board_attr_group);
> if (ret)
> - goto err_out0;
> + goto err_out1;
> if (amdgpu_pm_get_sensor_generic(adev, AMDGPU_PP_SENSOR_MAXNODEPOWERLIMIT,
> (void *)&tmp) != -EOPNOTSUPP) {
> sysfs_add_file_to_group(&adev->dev->kobj,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-30 5:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-30 5:11 [PATCH] drm/amd/pm: fix missing device_attr cleanup in amdgpu_pm_sysfs_init() Yang Wang
2025-10-30 5:21 ` Lazar, Lijo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox