arch/x86/mm/mpx.c: Clean up code by removing unnecessary assignment
PATCH 1/1 arch/x86/mm/mpx.c: Clean up code by removing unnecessary assignment
From: Mateusz Nosek <[email protected]>
Previously variable 'ret' is assigned just before return instruction. The variable is local so this assignment is useless
and therefore can be removed.
Signed-off-by Mateusz Nosek <[email protected]>
--- arch/x86/mm/mpx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
arch/x86/mm/mpx.c +1 -3
@@ -827,10 +827,8 @@ static int try_unmap_single_bt(struct mm_struct *mm,/* * No bounds table there, so nothing to unmap. */ -if (ret == -ENOENT ) { - ret =0 ; +if (ret == -ENOENT )return 0 ; - }if (ret)return ret;/*
Signature · 1 line
2.17.1
Borislav Petkov
maintainerQuoted 18 lines · On Sun, Jan 19, 2020 at 02:09:33PM +0100, [email protected] wrote:
From: Mateusz Nosek <[email protected]>
Previously variable 'ret' is assigned just before return instruction. The variable is local so this assignment is useless
and therefore can be removed.Signed-off-by Mateusz Nosek <[email protected]>--- arch/x86/mm/mpx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)arch/x86/mm/mpx.c +0
-0@@ -827,10 +827,8 @@ static int try_unmap_single_bt(struct mm_struct *mm,/*
arch/x86/mm/mpx.c static int try_unmap_single_bt(struct mm_struct *mm, · line 834
Quoted 10 lines
arch/x86/mm/mpx.c +1
-3* No bounds table there, so nothing to unmap. */ -if (ret == -ENOENT ) { - ret =0 ; +if (ret == -ENOENT )return 0 ; - }if (ret)return ret;/*
That code is going away so you can ignore it completely.
Thx.
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette