mirror of
https://github.com/u-boot/u-boot.git
synced 2024-12-22 19:23:26 +08:00
layerscape: fdt.c: Check for NULL return value from fdt_getprop()
Check for NULL return value from fdt_getprop() in fdt_fixup_remove_jr() Signed-off-by: Priyanka Singh <priyanka.singh@nxp.com> [Fixed checkpatch errors/warnings] Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
This commit is contained in:
parent
848a2efd14
commit
03d095e87d
@ -400,10 +400,12 @@ void fdt_fixup_remove_jr(void *blob)
|
||||
|
||||
while (jr_node != -FDT_ERR_NOTFOUND) {
|
||||
reg = (fdt32_t *)fdt_getprop(blob, jr_node, "reg", &len);
|
||||
jr_offset = fdt_read_number(reg, addr_cells);
|
||||
if (jr_offset == used_jr) {
|
||||
fdt_del_node(blob, jr_node);
|
||||
break;
|
||||
if (reg) {
|
||||
jr_offset = fdt_read_number(reg, addr_cells);
|
||||
if (jr_offset == used_jr) {
|
||||
fdt_del_node(blob, jr_node);
|
||||
break;
|
||||
}
|
||||
}
|
||||
jr_node = fdt_node_offset_by_compatible(blob, jr_node,
|
||||
"fsl,sec-v4.0-job-ring");
|
||||
|
Loading…
Reference in New Issue
Block a user