diff mbox series

LoongArch: Fix unsigned expression compared with zero

Message ID 20220602040012.19756-1-jiapeng.chong@linux.alibaba.com
State New
Headers show
Series LoongArch: Fix unsigned expression compared with zero | expand

Commit Message

Jiapeng Chong June 2, 2022, 4 a.m. UTC
Fix the following coccicheck warnings:

./arch/loongarch/kernel/efi.c:157:5-11: WARNING: Unsigned expression
compared with zero: status < 0.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 arch/loongarch/kernel/efi.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/arch/loongarch/kernel/efi.c b/arch/loongarch/kernel/efi.c
index d36a325a990c..2f25a7fe0868 100644
--- a/arch/loongarch/kernel/efi.c
+++ b/arch/loongarch/kernel/efi.c
@@ -145,16 +145,13 @@  static int __init set_virtual_map(void)
 
 void __init efi_runtime_init(void)
 {
-	efi_status_t status;
-
 	if (!efi_enabled(EFI_BOOT))
 		return;
 
 	if (!efi_systab->runtime)
 		return;
 
-	status = set_virtual_map();
-	if (status < 0)
+	if (set_virtual_map() < 0)
 		return;
 
 	if (efi_runtime_disabled()) {