]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ACPI: thermal: Get rid of a dummy local variable
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 28 Aug 2025 11:02:01 +0000 (13:02 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 4 Sep 2025 18:22:33 +0000 (20:22 +0200)
The second argument of acpi_bus_update_power() can be NULL, so drop the
power_state dummy local variable in acpi_thermal_resume() used just for
avoiding passing NULL as the second argument to that function.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/13851842.uLZWGnKmhe@rafael.j.wysocki
drivers/acpi/thermal.c

index 5c2defe55898f1069daf3e49ecd28865b8de5d61..8537395b417b0fdc24dc8a1e28dd3e57aaa23cc4 100644 (file)
@@ -924,7 +924,7 @@ static int acpi_thermal_suspend(struct device *dev)
 static int acpi_thermal_resume(struct device *dev)
 {
        struct acpi_thermal *tz;
-       int i, j, power_state;
+       int i, j;
 
        if (!dev)
                return -EINVAL;
@@ -939,10 +939,8 @@ static int acpi_thermal_resume(struct device *dev)
                if (!acpi_thermal_trip_valid(acpi_trip))
                        break;
 
-               for (j = 0; j < acpi_trip->devices.count; j++) {
-                       acpi_bus_update_power(acpi_trip->devices.handles[j],
-                                             &power_state);
-               }
+               for (j = 0; j < acpi_trip->devices.count; j++)
+                       acpi_bus_update_power(acpi_trip->devices.handles[j], NULL);
        }
 
        acpi_queue_thermal_check(tz);