Upgrade to 4.4.50-rt62
[kvmfornfv.git] / kernel / drivers / thermal / rockchip_thermal.c
index e845841..7106288 100644 (file)
@@ -545,15 +545,14 @@ static int rockchip_configure_from_dt(struct device *dev,
                         thermal->chip->tshut_temp);
                thermal->tshut_temp = thermal->chip->tshut_temp;
        } else {
+               if (shut_temp > INT_MAX) {
+                       dev_err(dev, "Invalid tshut temperature specified: %d\n",
+                               shut_temp);
+                       return -ERANGE;
+               }
                thermal->tshut_temp = shut_temp;
        }
 
-       if (thermal->tshut_temp > INT_MAX) {
-               dev_err(dev, "Invalid tshut temperature specified: %d\n",
-                       thermal->tshut_temp);
-               return -ERANGE;
-       }
-
        if (of_property_read_u32(np, "rockchip,hw-tshut-mode", &tshut_mode)) {
                dev_warn(dev,
                         "Missing tshut mode property, using default (%s)\n",