diff options
| -rw-r--r-- | arch/x86/mm/mpx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/mm/mpx.c b/arch/x86/mm/mpx.c index b2fd67da1701..ef05755a1900 100644 --- a/arch/x86/mm/mpx.c +++ b/arch/x86/mm/mpx.c | |||
| @@ -123,7 +123,7 @@ static int get_reg_offset(struct insn *insn, struct pt_regs *regs, | |||
| 123 | break; | 123 | break; |
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | if (regno > nr_registers) { | 126 | if (regno >= nr_registers) { |
| 127 | WARN_ONCE(1, "decoded an instruction with an invalid register"); | 127 | WARN_ONCE(1, "decoded an instruction with an invalid register"); |
| 128 | return -EINVAL; | 128 | return -EINVAL; |
| 129 | } | 129 | } |
