Skip to contentSkip to conversation

thermal: remove a pointless check

PATCH New Alan 1 participant 1 message Feb 15, 2016 Thermal

lore
Share & tools
lore

Alan

author
#0 lore raw

PATCH 1/1 thermal: remove a pointless check

The state in devfreq_cooling_state2power is unsigned so removed the < 0 check.

---
 drivers/thermal/devfreq_cooling.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/devfreq_cooling.c +1 -1
index 01f0015..81631b1 100644
@@ -312,7 +312,7 @@ static int devfreq_cooling_state2power(struct thermal_cooling_device *cdev,
 	unsigned long freq;
 	u32 static_power;
 
-	if (state < 0 || state >= dfc->freq_table_size)
+	if (state >= dfc->freq_table_size)
 		return -EINVAL;
 
 	freq = dfc->freq_table[state];