lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220917065345.2595-1-williamsukatube@163.com>
Date:   Sat, 17 Sep 2022 14:53:45 +0800
From:   williamsukatube@....com
To:     chenhuacai@...nel.org, loongarch@...ts.linux.dev,
        linux-kernel@...r.kernel.org
Cc:     kernel@...0n.name, William Dean <williamsukatube@....com>
Subject: [PATCH -next] LoongArch: simplify code in apply_r_larch_sop_push_dup

From: William Dean <williamsukatube@....com>

It could directly return 'rela_stack_push' to simplify code.

Signed-off-by: William Dean <williamsukatube@....com>
---
 arch/loongarch/kernel/module.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/loongarch/kernel/module.c b/arch/loongarch/kernel/module.c
index 638427ff0d51..a8f90d51d9ae 100644
--- a/arch/loongarch/kernel/module.c
+++ b/arch/loongarch/kernel/module.c
@@ -99,13 +99,10 @@ static int apply_r_larch_sop_push_dup(struct module *mod, u32 *location, Elf_Add
 	if (err)
 		return err;
 	err = rela_stack_push(opr1, rela_stack, rela_stack_top);
-	if (err)
-		return err;
-	err = rela_stack_push(opr1, rela_stack, rela_stack_top);
 	if (err)
 		return err;

-	return 0;
+	return rela_stack_push(opr1, rela_stack, rela_stack_top);
 }

 static int apply_r_larch_sop_push_plt_pcrel(struct module *mod, u32 *location, Elf_Addr v,
--
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ