Message ID | 20170503213158.14106-1-xypron.glpk@gmx.de |
---|---|
State | Accepted |
Commit | 1275a44e2f0579aba11d59c92c1717d5f9abc5e9 |
Delegated to: | Tom Rini |
Headers | show |
On Wed, May 03, 2017 at 11:31:58PM +0200, xypron.glpk@gmx.de wrote: > 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> Applied to u-boot/master, thanks!
diff --git a/arch/arm/mach-mvebu/arm64-common.c b/arch/arm/mach-mvebu/arm64-common.c index 1c0477a3ca..2ef5726905 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; }
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> --- I do not have a board for testing. So review carefully. --- arch/arm/mach-mvebu/arm64-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)