projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea75326
)
powerpc/mpc85xx: Don't deref NULL if qman portal lacks cell-index
author
Scott Wood
<scottwood@freescale.com>
Fri, 17 Apr 2015 23:10:06 +0000
(18:10 -0500)
committer
York Sun
<yorksun@freescale.com>
Mon, 4 May 2015 16:24:57 +0000
(09:24 -0700)
Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
arch/powerpc/cpu/mpc85xx/portals.c
patch
|
blob
|
history
diff --git
a/arch/powerpc/cpu/mpc85xx/portals.c
b/arch/powerpc/cpu/mpc85xx/portals.c
index ec3b2924b9d87c9651c5b25c9c1c2ca7974fa4c0..3777c6faa166142685e0364e4e23c82d010b3346 100644
(file)
--- a/
arch/powerpc/cpu/mpc85xx/portals.c
+++ b/
arch/powerpc/cpu/mpc85xx/portals.c
@@
-249,8
+249,13
@@
void fdt_fixup_qportals(void *blob)
#ifdef CONFIG_FSL_CORENET
u32 liodns[2];
#endif
- const int *ci = fdt_getprop(blob, off, "cell-index", NULL);
- int i = *ci;
+ const int *ci = fdt_getprop(blob, off, "cell-index", &err);
+ int i;
+
+ if (!ci)
+ goto err;
+
+ i = *ci;
#ifdef CONFIG_SYS_DPAA_FMAN
int j;
#endif