mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 14:41:31 +00:00
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: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
parent
cc93834dee
commit
1275a44e2f
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue