diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-04-23 13:29:17 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-04-23 13:33:26 +0200 |
| commit | 0d31ea587709216d88183fe4ca0c8aba5e0205b8 (patch) | |
| tree | d53e955f7bf1511b3a5f70448285b32f0ffbaa0d /drivers/acpi/thermal.c | |
| parent | 684e9f5f97eb4b7831298ffad140d5c1d426ff27 (diff) | |
| parent | ed30a4a51bb196781c8058073ea720133a65596f (diff) | |
| download | linux-0d31ea587709216d88183fe4ca0c8aba5e0205b8.tar.gz linux-0d31ea587709216d88183fe4ca0c8aba5e0205b8.tar.bz2 linux-0d31ea587709216d88183fe4ca0c8aba5e0205b8.zip | |
Merge 6.9-rc5 into usb-next
We need the usb/thunderbolt fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/acpi/thermal.c')
| -rw-r--r-- | drivers/acpi/thermal.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 302dce0b2b50..d67881b50bca 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -662,14 +662,15 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz, { int result; - tz->thermal_zone = thermal_zone_device_register_with_trips("acpitz", - trip_table, - trip_count, - tz, - &acpi_thermal_zone_ops, - NULL, - passive_delay, - tz->polling_frequency * 100); + if (trip_count) + tz->thermal_zone = thermal_zone_device_register_with_trips( + "acpitz", trip_table, trip_count, tz, + &acpi_thermal_zone_ops, NULL, passive_delay, + tz->polling_frequency * 100); + else + tz->thermal_zone = thermal_tripless_zone_device_register( + "acpitz", tz, &acpi_thermal_zone_ops, NULL); + if (IS_ERR(tz->thermal_zone)) return PTR_ERR(tz->thermal_zone); @@ -901,11 +902,8 @@ static int acpi_thermal_add(struct acpi_device *device) trip++; } - if (trip == trip_table) { + if (trip == trip_table) pr_warn(FW_BUG "No valid trip points!\n"); - result = -ENODEV; - goto free_memory; - } result = acpi_thermal_register_thermal_zone(tz, trip_table, trip - trip_table, |
