Explorar el Código

Merge branch 'pm-cpufreq'

* pm-cpufreq:
  cpufreq: fix overflow in cpufreq_table_find_index_dl()
Rafael J. Wysocki hace 9 años
padre
commit
350d32395b
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      include/linux/cpufreq.h

+ 2 - 2
include/linux/cpufreq.h

@@ -677,10 +677,10 @@ static inline int cpufreq_table_find_index_dl(struct cpufreq_policy *policy,
 		if (best == table - 1)
 			return pos - table;
 
-		return best - pos;
+		return best - table;
 	}
 
-	return best - pos;
+	return best - table;
 }
 
 /* Works only on sorted freq-tables */