]> git.karo-electronics.de Git - karo-tx-linux.git/commit
PM / Suspend: Off by one in pm_suspend()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 21 Sep 2011 18:55:04 +0000 (20:55 +0200)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Fri, 17 Aug 2012 19:35:52 +0000 (15:35 -0400)
commit7db9f90917b40dde4c5ea003cf58cd9eddb557c1
tree2eca3623ab5729ce8263fb8eac80210bf1a6b650
parentc6817c1778ce37b9bb5a65881675f4cae17312f8
PM / Suspend: Off by one in pm_suspend()

commit 528f7ce6e439edeac38f6b3f8561f1be129b5e91 upstream.

In enter_state() we use "state" as an offset for the pm_states[]
array.  The pm_states[] array only has PM_SUSPEND_MAX elements so
this test is off by one.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
kernel/power/suspend.c