powerpc/mpc85xx: Don't deref NULL if qman portal lacks cell-index
PATCH 1/1 powerpc/mpc85xx: Don't deref NULL if qman portal lacks cell-index
Signed-off-by Scott Wood <[email protected]>
Cc Madalin-Cristian Bucur <[email protected]>
--- arch/powerpc/cpu/mpc85xx/portals.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
arch/powerpc/cpu/mpc85xx/portals.c +7 -2
@@ -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
Signature · 1 line
2.1.0
PATCH 1/1 powerpc/mpc85xx: Don't deref NULL if qman portal lacks cell-index
Quoted 3 lines · Scott Wood
Signed-off-by Scott Wood <[email protected]>Cc Madalin-Cristian Bucur <[email protected]>---
Applied to u-boot-mpc85xx master. Awaiting upstream.
York