x86/mm: Refine mmap syscall implementation
authorAdrian Huang <ahuang12@lenovo.com>
Thu, 17 Dec 2020 05:26:48 +0000 (13:26 +0800)
committerBorislav Petkov <bp@suse.de>
Tue, 5 Jan 2021 18:07:42 +0000 (19:07 +0100)
commit91a8f6cb06b33adc79fbf5f7381d907485767c00
tree95006acddbfcb9bbfd344de896f2da3e744df02a
parent3052636aa9aa2492ccac973449be63cae5b93a67
x86/mm: Refine mmap syscall implementation

It is unnecessary to use the local variable 'error' in the mmap syscall
implementation function - just return -EINVAL directly and get rid of
the local variable altogether.

 [ bp: Massage commit message. ]

Signed-off-by: Adrian Huang <ahuang12@lenovo.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lkml.kernel.org/r/20201217052648.24656-1-adrianhuang0701@gmail.com
arch/x86/kernel/sys_x86_64.c