summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-18 14:33:18 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-18 14:33:18 -0800
commitfa2827e72cfcfac683e2e3ab355a0dbc97d52522 (patch)
tree558d54906f1d7674b1c76e05c074784de24585fd
parent9a199794fd789c783d34281ac1acde011a7affa8 (diff)
parent15176b818e048ccf6ef4b96db34eda7b7e98938a (diff)
Merge tag 'thermal-7.0-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull thermal control fix from Rafael Wysocki: "This fixes a sysfs group leak on DLVR registration failure in the Intel int340x thermal driver (Kaushlendra Kumar)" * tag 'thermal-7.0-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: int340x: Fix sysfs group leak on DLVR registration failure
-rw-r--r--drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c b/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c
index bb9398dfa3c1..314fbc1f490f 100644
--- a/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c
+++ b/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c
@@ -467,8 +467,11 @@ int proc_thermal_rfim_add(struct pci_dev *pdev, struct proc_thermal_device *proc
break;
}
ret = sysfs_create_group(&pdev->dev.kobj, &dlvr_attribute_group);
- if (ret)
+ if (ret) {
+ if (proc_priv->mmio_feature_mask & PROC_THERMAL_FEATURE_FIVR)
+ sysfs_remove_group(&pdev->dev.kobj, &fivr_attribute_group);
return ret;
+ }
}
if (proc_priv->mmio_feature_mask & PROC_THERMAL_FEATURE_DVFS) {