From: Rafael J. Wysocki Date: Mon, 4 May 2015 20:53:28 +0000 (+0200) Subject: cpuidle: Check the sign of index in cpuidle_reflect() X-Git-Tag: omap-for-v4.3/legacy-v2-signed~183^2~8^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a802ea96454570f3c526dd9d7ad8c706e570444d;p=pandora-kernel.git cpuidle: Check the sign of index in cpuidle_reflect() Avoid calling the governor's ->reflect method if the state index passed to cpuidle_reflect() is negative. This allows the analogous check to be dropped from menu_reflect(), so do that too, and ensures that arbitrary error codes can be passed to cpuidle_reflect() as the index with no adverse consequences. Signed-off-by: Rafael J. Wysocki Reviewed-by: Daniel Lezcano Acked-by: Peter Zijlstra (Intel) --- Reading git-diff-tree failed