diff options
-rw-r--r-- | drivers/thermal/rockchip_thermal.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c index b58e3fb9b311..433085a97626 100644 --- a/drivers/thermal/rockchip_thermal.c +++ b/drivers/thermal/rockchip_thermal.c | |||
@@ -693,15 +693,14 @@ static int rockchip_configure_from_dt(struct device *dev, | |||
693 | thermal->chip->tshut_temp); | 693 | thermal->chip->tshut_temp); |
694 | thermal->tshut_temp = thermal->chip->tshut_temp; | 694 | thermal->tshut_temp = thermal->chip->tshut_temp; |
695 | } else { | 695 | } else { |
696 | if (shut_temp > INT_MAX) { | ||
697 | dev_err(dev, "Invalid tshut temperature specified: %d\n", | ||
698 | shut_temp); | ||
699 | return -ERANGE; | ||
700 | } | ||
696 | thermal->tshut_temp = shut_temp; | 701 | thermal->tshut_temp = shut_temp; |
697 | } | 702 | } |
698 | 703 | ||
699 | if (thermal->tshut_temp > INT_MAX) { | ||
700 | dev_err(dev, "Invalid tshut temperature specified: %d\n", | ||
701 | thermal->tshut_temp); | ||
702 | return -ERANGE; | ||
703 | } | ||
704 | |||
705 | if (of_property_read_u32(np, "rockchip,hw-tshut-mode", &tshut_mode)) { | 704 | if (of_property_read_u32(np, "rockchip,hw-tshut-mode", &tshut_mode)) { |
706 | dev_warn(dev, | 705 | dev_warn(dev, |
707 | "Missing tshut mode property, using default (%s)\n", | 706 | "Missing tshut mode property, using default (%s)\n", |