Commit 46853a8b authored by Yang Li's avatar Yang Li Committed by Hongchen Zhang
Browse files

LoongArch: Fix unsigned comparison with less than zero

mainline inclusion
from mainline-v6.0-rc1
commit aafcac81
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I5OHOB


CVE: NA

--------------------------------

The return value from the call to get_timer_irq() is int, which can be
a negative error code. However, the return value is being assigned to an
unsigned int variable 'irq', so making 'irq' an int.

Eliminate the following coccicheck warning:
./arch/loongarch/kernel/time.c:146:5-8: WARNING: Unsigned expression compared with zero: irq < 0

Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
Signed-off-by: default avatarYang Li <yang.lee@linux.alibaba.com>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent 5654509c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment