Skip to content

Commit fa2827e

Browse files
committed
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
2 parents 9a19979 + 15176b8 commit fa2827e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,8 +467,11 @@ int proc_thermal_rfim_add(struct pci_dev *pdev, struct proc_thermal_device *proc
467467
break;
468468
}
469469
ret = sysfs_create_group(&pdev->dev.kobj, &dlvr_attribute_group);
470-
if (ret)
470+
if (ret) {
471+
if (proc_priv->mmio_feature_mask & PROC_THERMAL_FEATURE_FIVR)
472+
sysfs_remove_group(&pdev->dev.kobj, &fivr_attribute_group);
471473
return ret;
474+
}
472475
}
473476

474477
if (proc_priv->mmio_feature_mask & PROC_THERMAL_FEATURE_DVFS) {

0 commit comments

Comments
 (0)