[PATCH] LoongArch: Fix unsigned expression compared with zero

Jiapeng Chong posted 1 patch 3 years, 11 months ago
arch/loongarch/kernel/efi.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
[PATCH] LoongArch: Fix unsigned expression compared with zero
Posted by Jiapeng Chong 3 years, 11 months ago
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 --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()) {
-- 
2.20.1.7.g153144c