summaryrefslogtreecommitdiff
path: root/arch/arm/mach-stm32/stm32f1/flash.c
diff options
context:
space:
mode:
authorxypron.glpk@gmx.de <xypron.glpk@gmx.de>2017-07-30 18:46:05 (GMT)
committerTom Rini <trini@konsulko.com>2017-08-13 19:17:28 (GMT)
commitd1fe19766bc2a4c065b29a5617472c66a2696a67 (patch)
tree488b376802e4e885f275db55b351da63cb6c405e /arch/arm/mach-stm32/stm32f1/flash.c
parenta22bbfda6edd3cba79496b9d02077d5ae64ff4b0 (diff)
downloadu-boot-fsl-qoriq-d1fe19766bc2a4c065b29a5617472c66a2696a67.tar.xz
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 <xypron.glpk@gmx.de>
Diffstat (limited to 'arch/arm/mach-stm32/stm32f1/flash.c')
-rw-r--r--arch/arm/mach-stm32/stm32f1/flash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-stm32/stm32f1/flash.c b/arch/arm/mach-stm32/stm32f1/flash.c
index 7d41f63..9dc8e11 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;