mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-06 17:30:35 +01:00
powerpc/mpc85xx: Don't deref NULL if qman portal lacks cell-index
Signed-off-by: Scott Wood <scottwood@freescale.com> Cc: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
This commit is contained in:
parent
ea753267d5
commit
438031e1bc
1 changed files with 7 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue