Revert "bcm2711_thermal: Don't clamp temperature at zero"
authorDom Cobley <popcornmix@gmail.com>
Wed, 15 Jun 2022 13:58:46 +0000 (14:58 +0100)
committerDom Cobley <popcornmix@gmail.com>
Wed, 15 Jun 2022 13:58:46 +0000 (14:58 +0100)
This reverts commit 117678e1119f7fade8ee3bf740c3537eeb41036b.

drivers/thermal/broadcom/bcm2711_thermal.c

index 6e2ff71..9f5a1eb 100644 (file)
@@ -52,7 +52,7 @@ static int bcm2711_get_temp(void *data, int *temp)
        /* Convert a HW code to a temperature reading (millidegree celsius) */
        t = slope * val + offset;
 
-       *temp = t;
+       *temp = t < 0 ? 0 : t;
 
        return 0;
 }