Fixbug, compile error without debug option

Signed-off-by: Chao Wei <chao.wei@sophgo.com>
This commit is contained in:
Chao Wei
2025-11-06 14:25:03 +08:00
parent 6eef399cfc
commit adc7ba17f3

View File

@@ -70,6 +70,8 @@ static int sophgo_wdt_system_get_top_base(void *fdt,
const fdt32_t *val;
int len, noff;
noff = 0;
val = fdt_getprop(fdt, nodeoff, "subctrl-syscon", &len);
if (val || len >= sizeof(fdt32_t)) {
noff = fdt_node_offset_by_phandle(fdt, fdt32_to_cpu(*val));