x86/fpu: Cleanup arch_set_user_pkey_access()
authorThomas Gleixner <tglx@linutronix.de>
Wed, 23 Jun 2021 12:01:50 +0000 (14:01 +0200)
committerBorislav Petkov <bp@suse.de>
Wed, 23 Jun 2021 15:52:41 +0000 (17:52 +0200)
commit9fe8a6f5eed8fff6b2d7dbc99b911334e311732d
tree6130bcbe9413b23bf5556f1af3c78bdb1db1d78f
parent71ef453355a9197fcfd8ff22391a4ad7861d79e6
x86/fpu: Cleanup arch_set_user_pkey_access()

The function does a sanity check with a WARN_ON_ONCE() but happily proceeds
when the pkey argument is out of range.

Clean it up.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20210623121453.635764326@linutronix.de
arch/x86/kernel/fpu/xstate.c