Skip to content
Snippets Groups Projects
Commit 1275a44e authored by xypron.glpk@gmx.de's avatar xypron.glpk@gmx.de Committed by Tom Rini
Browse files

arm64: mvebu: incorrect check of fdt address cells


In dram_init_banksize there seems to be a typo concerning
a plausibility check of the fdt.
Testing sc > 2 twice does not make any sense.

The problem was indicated by cppcheck.

Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
parent cc93834d
No related branches found
No related tags found
No related merge requests found
......@@ -94,7 +94,7 @@ int dram_init_banksize(void)
ac = fdt_address_cells(fdt, 0);
sc = fdt_size_cells(fdt, 0);
if (ac < 1 || sc > 2 || sc < 1 || sc > 2) {
if (ac < 1 || ac > 2 || sc < 1 || sc > 2) {
printf("invalid address/size cells\n");
return -ENXIO;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment