From: Fabio M. De Francesco Date: Thu, 19 Feb 2026 18:15:55 +0000 (+0100) Subject: cpufreq: intel_pstate: Allow repeated intel_pstate disable X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6acae3c8332f3125e331f2d896bef994d4460376;p=thirdparty%2Fkernel%2Flinux.git cpufreq: intel_pstate: Allow repeated intel_pstate disable Repeated intel_pstate disables currently return an error, adding unnecessary complexity to userspace scripts which must first read the current state and conditionally write 'off'. Make repeated intel_pstate disables a no-op. Signed-off-by: Fabio M. De Francesco Acked-by: Srinivas Pandruvada Link: https://patch.msgid.link/20260219181600.16388-1-fabio.m.de.francesco@linux.intel.com Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 11c58af419006..51938c5a47ca9 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -3472,7 +3472,7 @@ static int intel_pstate_update_status(const char *buf, size_t size) { if (size == 3 && !strncmp(buf, "off", size)) { if (!intel_pstate_driver) - return -EINVAL; + return 0; if (hwp_active) return -EBUSY;