Skip to content

Commit 72ecd41

Browse files
D-Trivenirlubos
authored andcommitted
[nrf fromlist] soc: nordic: nrf54h: Add DT_NODE_EXISTS check
Add `DT_NODE_EXISTS` check to ensure cpurad partition nodes exist before referencing their addresses. This prevents build errors when these partitions are not defined in the devicetree. Upstream PR #: 93815 Signed-off-by: Triveni Danda <[email protected]>
1 parent f77740b commit 72ecd41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

soc/nordic/nrf54h/soc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ void soc_late_init_hook(void)
216216
DT_REG_ADDR(DT_NODELABEL(cpurad_slot0_partition)) +
217217
CONFIG_ROM_START_OFFSET);
218218
}
219-
#else
219+
#elif DT_NODE_EXISTS(DT_NODELABEL(cpurad_slot0_partition))
220220
radiocore_address =
221221
(void *)(DT_REG_ADDR(DT_GPARENT(DT_NODELABEL(cpurad_slot0_partition))) +
222222
DT_REG_ADDR(DT_NODELABEL(cpurad_slot0_partition)) +

0 commit comments

Comments
 (0)