Power: Add guard condition for maximum wakeup reasons

Ensure the array for the wakeup reason IRQs does not overflow.

Change-Id: Iddc57a3aeb1888f39d4e7b004164611803a4d37c
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>

idea is taken here -
https://github.com/franciscofranco/flo/commit/6549bf493c07b2643fc8f4a5def76ce83712b0c9