diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/thermal.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 5e9641c93fcd..782c2250443e 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
@@ -884,10 +884,15 @@ static void acpi_thermal_check(void *data) | |||
884 | static int thermal_get_temp(struct thermal_zone_device *thermal, char *buf) | 884 | static int thermal_get_temp(struct thermal_zone_device *thermal, char *buf) |
885 | { | 885 | { |
886 | struct acpi_thermal *tz = thermal->devdata; | 886 | struct acpi_thermal *tz = thermal->devdata; |
887 | int result; | ||
887 | 888 | ||
888 | if (!tz) | 889 | if (!tz) |
889 | return -EINVAL; | 890 | return -EINVAL; |
890 | 891 | ||
892 | result = acpi_thermal_get_temperature(tz); | ||
893 | if (result) | ||
894 | return result; | ||
895 | |||
891 | return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS(tz->temperature)); | 896 | return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS(tz->temperature)); |
892 | } | 897 | } |
893 | 898 | ||