diff options
Diffstat (limited to 'drivers/thermal/rockchip_thermal.c')
| -rw-r--r-- | drivers/thermal/rockchip_thermal.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c index 7106288efae3..e845841ab036 100644 --- a/drivers/thermal/rockchip_thermal.c +++ b/drivers/thermal/rockchip_thermal.c @@ -545,14 +545,15 @@ 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", |
