Commit 360ab885 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt Committed by Anup Patel
Browse files

lib: utils: missing initialization in thead_reset_init

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: 49e422c5

 ("lib: utils: reset: Add T-HEAD sample platform reset driver")
Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: default avatarAnup Patel <anup.patel@wdc.com>
parent 1da3d80b
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment