提交 d1fe1976 编写于 作者: X xypron.glpk@gmx.de 提交者: Tom Rini

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: NHeinrich Schuchardt <xypron.glpk@gmx.de>
上级 a22bbfda
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册