浏览代码

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>
xypron.glpk@gmx.de 7 年之前
父节点
当前提交
d1fe19766b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      arch/arm/mach-stm32/stm32f1/flash.c

+ 1 - 1
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;