summaryrefslogtreecommitdiff
path: root/board/xilinx/common/board.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2022-10-08 11:13:17 +0200
committerMichal Simek <michal.simek@amd.com>2022-10-10 12:28:08 +0200
commit872a9b81ee32336668f81d8221dfce41508584e4 (patch)
tree975003a4833fd4c229efa18f53ff34441aafbed4 /board/xilinx/common/board.c
parentf60be62d771c9a9d0b57576c0ef5fb832d8d40ba (diff)
xilinx: common: fix board_late_init_xilinx()
Compiling with GCC-12 leads to an error: +board/xilinx/common/board.c:479:37: error: the comparison will always evaluate as 'true' for the address of 'mac_addr' will never be NULL [-Werror=address] + 479 | if (!desc->mac_addr[i]) + | ^ Remove the redundant check. Fixes: a03b594738f8 ("xilinx: board: Add support for additional card detection") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Link: https://lore.kernel.org/r/20221008091317.52838-1-heinrich.schuchardt@canonical.com Signed-off-by: Michal Simek <michal.simek@amd.com>
Diffstat (limited to 'board/xilinx/common/board.c')
-rw-r--r--board/xilinx/common/board.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
index bbfe84b8d0a..99fdbac639b 100644
--- a/board/xilinx/common/board.c
+++ b/board/xilinx/common/board.c
@@ -476,9 +476,6 @@ int board_late_init_xilinx(void)
continue;
for (i = 0; i < EEPROM_HDR_NO_OF_MAC_ADDR; i++) {
- if (!desc->mac_addr[i])
- break;
-
if (is_valid_ethaddr((const u8 *)desc->mac_addr[i]))
ret |= eth_env_set_enetaddr_by_index("eth",
macid++, desc->mac_addr[i]);