* [PATCH] thermal: remove a pointless check
@ 2016-02-15 18:54 Alan
0 siblings, 0 replies; only message in thread
From: Alan @ 2016-02-15 18:54 UTC (permalink / raw)
To: rui.zhang, linux-kernel
The state in devfreq_cooling_state2power is unsigned so removed the < 0
check.
Signed-off-by: Alan Cox <alan@linux.intel.com>
---
drivers/thermal/devfreq_cooling.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/devfreq_cooling.c b/drivers/thermal/devfreq_cooling.c
index 01f0015..81631b1 100644
--- a/drivers/thermal/devfreq_cooling.c
+++ b/drivers/thermal/devfreq_cooling.c
@@ -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];
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-02-15 18:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-15 18:54 [PATCH] thermal: remove a pointless check Alan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®