summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mvebu
diff options
context:
space:
mode:
authorxypron.glpk@gmx.de <xypron.glpk@gmx.de>2017-05-03 21:31:58 (GMT)
committerTom Rini <trini@konsulko.com>2017-05-05 20:45:56 (GMT)
commit1275a44e2f0579aba11d59c92c1717d5f9abc5e9 (patch)
tree7085ec25b41672e37ae25ab94292ef0390cf4ffa /arch/arm/mach-mvebu
parentcc93834dee106553e76b69b5cedab2de0c506fff (diff)
downloadu-boot-fsl-qoriq-1275a44e2f0579aba11d59c92c1717d5f9abc5e9.tar.xz
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>
Diffstat (limited to 'arch/arm/mach-mvebu')
-rw-r--r--arch/arm/mach-mvebu/arm64-common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-mvebu/arm64-common.c b/arch/arm/mach-mvebu/arm64-common.c
index 1c0477a..2ef5726 100644
--- a/arch/arm/mach-mvebu/arm64-common.c
+++ b/arch/arm/mach-mvebu/arm64-common.c
@@ -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;
}