flash/stm32l4x: add missing break statement

this is not a bug fix, this for loop will issue only one match
adding the break will save unnecessary more loops.

Change-Id: Ic1484ea8cdea1b284eb570f9e3e7818e07daf5cd
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: http://openocd.zylin.com/6248
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
Tested-by: jenkins
This commit is contained in:
Tarek BOCHKATI 2021-05-13 17:44:14 +01:00 committed by Antonio Borneo
parent 15dd48119a
commit 2d16d62ddc
1 changed files with 3 additions and 1 deletions

View File

@ -1351,8 +1351,10 @@ static int stm32l4_probe(struct flash_bank *bank)
device_id = stm32l4_info->idcode & 0xFFF;
for (unsigned int n = 0; n < ARRAY_SIZE(stm32l4_parts); n++) {
if (device_id == stm32l4_parts[n].id)
if (device_id == stm32l4_parts[n].id) {
stm32l4_info->part_info = &stm32l4_parts[n];
break;
}
}
if (!stm32l4_info->part_info) {