Simplify kernel parameter array index checks.

We know the sizes of kernel parameter arrays.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>