Merge tag 'thermal-6.4-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull thermal control fixes from Rafael Wysocki:
 "These fix a NULL pointer dereference in the Intel powerclamp driver
  introduced during the 6.3 cycle and update MAINTAINERS to match recent
  code changes.

  Specifics:

   - Fix NULL pointer access in the Intel powerclamp thermal driver that
     occurs on attempts to set the cooling device state to 0 in the
     default configuration (Srinivas Pandruvada)

   - Drop the stale MAINTAINERS entry for the Intel Menlow thermal
     driver that has been removed recently (Lukas Bulwahn)"

* tag 'thermal-6.4-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  MAINTAINERS: remove section INTEL MENLOW THERMAL DRIVER
  thermal: intel: powerclamp: Fix NULL pointer access issue
diff --git a/MAINTAINERS b/MAINTAINERS
index e5c3101..4accfb9 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10556,12 +10556,6 @@
 F:	drivers/mfd/intel-m10-bmc*
 F:	include/linux/mfd/intel-m10-bmc.h
 
-INTEL MENLOW THERMAL DRIVER
-M:	Sujith Thomas <sujith.thomas@intel.com>
-L:	linux-pm@vger.kernel.org
-S:	Supported
-F:	drivers/thermal/intel/intel_menlow.c
-
 INTEL P-Unit IPC DRIVER
 M:	Zha Qipeng <qipeng.zha@intel.com>
 L:	platform-driver-x86@vger.kernel.org
diff --git a/drivers/thermal/intel/intel_powerclamp.c b/drivers/thermal/intel/intel_powerclamp.c
index 91fc7e2..36243a39 100644
--- a/drivers/thermal/intel/intel_powerclamp.c
+++ b/drivers/thermal/intel/intel_powerclamp.c
@@ -703,6 +703,10 @@ static int powerclamp_set_cur_state(struct thermal_cooling_device *cdev,
 
 	new_target_ratio = clamp(new_target_ratio, 0UL,
 				(unsigned long) (max_idle - 1));
+
+	if (powerclamp_data.target_ratio == new_target_ratio)
+		goto exit_set;
+
 	if (!powerclamp_data.target_ratio && new_target_ratio > 0) {
 		pr_info("Start idle injection to reduce power\n");
 		powerclamp_data.target_ratio = new_target_ratio;