* [PATCH 1/1] layerscape: fdt.c: Check for NULL return value from fdt_getprop()
@ 2020-11-02 6:08 Priyanka Singh
2020-12-11 8:05 ` Priyanka Jain
0 siblings, 1 reply; 2+ messages in thread
From: Priyanka Singh @ 2020-11-02 6:08 UTC (permalink / raw)
To: u-boot
Check for NULL return value from fdt_getprop() in fdt_fixup_remove_jr()
Signed-off-by: Priyanka Singh <priyanka.singh@nxp.com>
---
arch/arm/cpu/armv8/fsl-layerscape/fdt.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
index f5f75fa452..5fc17a7233 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
@@ -391,10 +391,13 @@ 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 != NULL)
+ {
+ 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");
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 1/1] layerscape: fdt.c: Check for NULL return value from fdt_getprop()
2020-11-02 6:08 [PATCH 1/1] layerscape: fdt.c: Check for NULL return value from fdt_getprop() Priyanka Singh
@ 2020-12-11 8:05 ` Priyanka Jain
0 siblings, 0 replies; 2+ messages in thread
From: Priyanka Jain @ 2020-12-11 8:05 UTC (permalink / raw)
To: u-boot
>-----Original Message-----
>From: Priyanka Singh <priyanka.singh@nxp.com>
>Sent: Monday, November 2, 2020 11:39 AM
>To: u-boot at lists.denx.de
>Cc: Priyanka Jain <priyanka.jain@nxp.com>; Priyanka Singh
><priyanka.singh@nxp.com>
>Subject: [PATCH 1/1] 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>
>---
<snip>
Applied to fsl-qoriq after fixing checkpatch errors/warnings.
Please run checkpatch test and fix warnings/errors before submitting the patch next time.
Awaiting upstream.
Thanks
Priyanka
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-11 8:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-02 6:08 [PATCH 1/1] layerscape: fdt.c: Check for NULL return value from fdt_getprop() Priyanka Singh
2020-12-11 8:05 ` Priyanka Jain
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.