flash/stm32l4x: add missing break statement 48/6248/2
authorTarek BOCHKATI <tarek.bouchkati@gmail.com>
Thu, 13 May 2021 16:44:14 +0000 (17:44 +0100)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 22 May 2021 09:05:05 +0000 (10:05 +0100)
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
src/flash/nor/stm32l4x.c

index 594bce03930c926e5a56ec8c55aeaa80dee71b94..7e1fe7cecd12c19816d1251e332113b89768e1dd 100644 (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) {

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)