summaryrefslogtreecommitdiff
path: root/drivers/thermal
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2020-12-15 02:38:06 +0300
committerDaniel Lezcano <daniel.lezcano@linaro.org>2021-01-20 00:23:11 +0300
commit53f04ca8153cc043cd2fa968ed451a85e8f70bd8 (patch)
tree0b9df41dad09908eb633fb128018b18bd702ad3a /drivers/thermal
parenta20b995b23e41190fb088e7dab4a2b956bf343ae (diff)
downloadlinux-53f04ca8153cc043cd2fa968ed451a85e8f70bd8.tar.xz
thermal/core: Remove pointless test with the THERMAL_TRIPS_NONE macro
The THERMAL_TRIPS_NONE is equal to -1, it is pointless to do a conversion in this function. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Thara Gopinath <thara.gopinath@linaro.org> Link: https://lore.kernel.org/r/20201214233811.485669-3-daniel.lezcano@linaro.org
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/thermal_sysfs.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c
index 4e7f9e880d76..345917a58f2f 100644
--- a/drivers/thermal/thermal_sysfs.c
+++ b/drivers/thermal/thermal_sysfs.c
@@ -875,10 +875,7 @@ trip_point_show(struct device *dev, struct device_attribute *attr, char *buf)
instance =
container_of(attr, struct thermal_instance, attr);
- if (instance->trip == THERMAL_TRIPS_NONE)
- return sprintf(buf, "-1\n");
- else
- return sprintf(buf, "%d\n", instance->trip);
+ return sprintf(buf, "%d\n", instance->trip);
}
ssize_t