lkml.org 
[lkml]   [2014]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] exec: remove redundant check in search_binary_handler()
Date
retval >= 0 is implied by retval != -ENOEXEC

Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
---
fs/exec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/exec.c b/fs/exec.c
index 7ea097f..aafafea 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1390,8 +1390,8 @@ int search_binary_handler(struct linux_binprm *bprm)
bprm->recursion_depth++;
retval = fmt->load_binary(bprm);
bprm->recursion_depth--;
- if (retval >= 0 || retval != -ENOEXEC ||
- bprm->mm == NULL || bprm->file == NULL) {
+ if (retval != -ENOEXEC || bprm->mm == NULL ||
+ bprm->file == NULL) {
put_binfmt(fmt);
return retval;
}
--
1.8.3.2


\
 
 \ /
  Last update: 2014-01-19 05:41    [W:0.028 / U:0.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site