]> git.sur5r.net Git - u-boot/commitdiff
stm32: remove redundant 'else if'
authorxypron.glpk@gmx.de <xypron.glpk@gmx.de>
Sun, 30 Jul 2017 18:46:05 +0000 (20:46 +0200)
committerTom Rini <trini@konsulko.com>
Sun, 13 Aug 2017 19:17:28 +0000 (15:17 -0400)
The if in the else branch is superfluous.
We can use a simple if.

The problem was indicated by cppcheck.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
arch/arm/mach-stm32/stm32f1/flash.c

index 7d41f63733d4a91a976e355819a8682831783b13..9dc8e1198f84a0dcdfcb8a625dcc036a4fca6b94 100644 (file)
@@ -49,7 +49,7 @@ unsigned long flash_init(void)
        if (size <= STM32_MAX_BANK) {
                banks = 1;
                flash_info[0].sector_count = size >> 1;
-       } else if (size > STM32_MAX_BANK) {
+       } else {
                banks = 2;
                flash_info[0].sector_count = STM32_MAX_BANK >> 1;
                flash_info[1].sector_count = (size - STM32_MAX_BANK) >> 1;