summaryrefslogtreecommitdiff
path: root/arch/arm/mach-socfpga/board.c
diff options
context:
space:
mode:
authorTingting Meng <tingting.meng@altera.com>2025-04-29 02:55:42 -0700
committerTien Fong Chee <tien.fong.chee@intel.com>2025-07-30 17:45:30 +0800
commit8eb3812c589ddbf30dc7ed3b2377da6af5b904fc (patch)
tree5ce8759badc5f06f65e7ed972e338c7e453e8891 /arch/arm/mach-socfpga/board.c
parent6e1cc5d861d388f5699859bac481822029881738 (diff)
arm: socfpga: agilex5: Coverity issue cleanup in jtag_usercode check
A redundant comparison (jtag_usercode >= 0) was removed from the condition checking jtag_usercode. Since jtag_usercode is an unsigned integer, the check for non-negativity was always true. The code was simplified to resolve the Coverity warning. Signed-off-by: Tingting Meng <tingting.meng@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@intel.com>
Diffstat (limited to 'arch/arm/mach-socfpga/board.c')
-rw-r--r--arch/arm/mach-socfpga/board.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-socfpga/board.c b/arch/arm/mach-socfpga/board.c
index bda12324803..28554b7a109 100644
--- a/arch/arm/mach-socfpga/board.c
+++ b/arch/arm/mach-socfpga/board.c
@@ -134,7 +134,7 @@ u8 socfpga_get_board_id(void)
if (jtag_usercode == DEFAULT_JTAG_USERCODE) {
debug("JTAG Usercode is not set. Default Board ID to 0\n");
- } else if (jtag_usercode >= 0 && jtag_usercode <= 255) {
+ } else if (jtag_usercode <= 255) {
board_id = jtag_usercode;
debug("Valid JTAG Usercode. Set Board ID to %u\n", board_id);
} else {