mirror of
https://github.com/revyos/thead-opensbi.git
synced 2026-06-21 09:12:28 +02:00
commit 360ab88569201f8d282cf98546b86b8576b6f2ad upstream
If property csr-copy does not exist, fdt_getprop() will return NULL and cnt
will have a random value from the stack.
Call clone_csrs() only if cnt is initialized to a non-zero value.
Fixes: 49e422c5ad7a ("lib: utils: reset: Add T-HEAD sample platform reset driver")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Anup Patel <anup.patel@wdc.com>