]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/mm: Cleanup prctl_enable_tagged_addr() nr_bits error checking
authorYosry Ahmed <yosryahmed@google.com>
Tue, 2 Jul 2024 13:21:39 +0000 (13:21 +0000)
committerDave Hansen <dave.hansen@linux.intel.com>
Tue, 2 Jul 2024 18:33:44 +0000 (11:33 -0700)
commitb7c35279e0da414e7d90eba76f58a16223a734cb
tree5e8fb9ddb04b7b1c349b3d41f5881cbbd0b001d6
parentec225f8c255fd0f256c282cc73d211550cb08b34
x86/mm: Cleanup prctl_enable_tagged_addr() nr_bits error checking

There are two separate checks in prctl_enable_tagged_addr() that nr_bits
is in the correct range. The checks are arranged such the correct case
is sandwiched between both error cases, which do exactly the same thing.

Simplify the if condition and pull the correct case outside with the
rest of the success code path.

Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Link: https://lore.kernel.org/all/20240702132139.3332013-4-yosryahmed%40google.com
arch/x86/kernel/process_64.c