lkml.org 
[lkml]   [2020]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] arch/x86/mm/mpx.c: Clean up code by removing unnecessary assignment
On Sun, Jan 19, 2020 at 02:09:33PM +0100, mateusznosek0@gmail.com wrote:
> From: Mateusz Nosek <mateusznosek0@gmail.com>
>
> 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 <mateusznosek0@gmail.com>
> ---
> arch/x86/mm/mpx.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/arch/x86/mm/mpx.c b/arch/x86/mm/mpx.c
> index 895fb7a9294d..30ab444301f5 100644
> --- a/arch/x86/mm/mpx.c
> +++ b/arch/x86/mm/mpx.c
> @@ -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;
> /*
> --

That code is going away so you can ignore it completely.

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

\
 
 \ /
  Last update: 2020-01-22 14:10    [W:0.041 / U:0.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site