Skip to content
Snippets Groups Projects
Commit d1fe1976 authored by xypron.glpk@gmx.de's avatar xypron.glpk@gmx.de Committed by Tom Rini
Browse files

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: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
parent a22bbfda
No related branches found
No related tags found
No related merge requests found
...@@ -49,7 +49,7 @@ unsigned long flash_init(void) ...@@ -49,7 +49,7 @@ unsigned long flash_init(void)
if (size <= STM32_MAX_BANK) { if (size <= STM32_MAX_BANK) {
banks = 1; banks = 1;
flash_info[0].sector_count = size >> 1; flash_info[0].sector_count = size >> 1;
} else if (size > STM32_MAX_BANK) { } else {
banks = 2; banks = 2;
flash_info[0].sector_count = STM32_MAX_BANK >> 1; flash_info[0].sector_count = STM32_MAX_BANK >> 1;
flash_info[1].sector_count = (size - STM32_MAX_BANK) >> 1; flash_info[1].sector_count = (size - STM32_MAX_BANK) >> 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment