From: xypron.glpk@gmx.de Date: Sun, 30 Jul 2017 18:46:05 +0000 (+0200) Subject: stm32: remove redundant 'else if' X-Git-Tag: v2017.09-rc2~28 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d1fe19766bc2a4c065b29a5617472c66a2696a67;p=u-boot stm32: remove redundant 'else if' 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 --- diff --git a/arch/arm/mach-stm32/stm32f1/flash.c b/arch/arm/mach-stm32/stm32f1/flash.c index 7d41f63733..9dc8e1198f 100644 --- a/arch/arm/mach-stm32/stm32f1/flash.c +++ b/arch/arm/mach-stm32/stm32f1/flash.c @@ -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;