On 10/08/20 9:36 am, Youling Tang wrote:
There is no need to jump to the "out" tag when "ret < 0", just return[snip]
directly to "ret".
Signed-off-by: Youling Tang <tangyouling@xxxxxxxxxxx>
---
tools/objtool/check.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index e034a8f..94b166d 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
if (file.elf->changed) {the out label code is no more required with this change, so remove
ret = elf_write(file.elf);
if (ret < 0)
- goto out;
+ return ret;
}
out:
it and return 0 for warnings for now. Previously cleanup() function
was called under the out label for both fatal errors (ret < 0) and
warnings. Now that cleanup() function is removed, the out label is
no longer required.