nrf51: remove dereference of null pointer 19/2119/2
authorSpencer Oliver <spen@spen-soft.co.uk>
Tue, 22 Apr 2014 19:53:50 +0000 (20:53 +0100)
committerPaul Fertser <fercerpav@gmail.com>
Sun, 27 Apr 2014 09:16:47 +0000 (09:16 +0000)
found by clang 3.4.

Change-Id: Id499b546f65acd7a719498bc97e33b21d1ba565a
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/2119
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-by: Andrey Smirnov <andrew.smirnov@gmail.com>
src/flash/nor/nrf51.c

index 2a4b88764eb8b8252fb562a2dcd3a34c72b0ade8..adb4004d982fa1f5df05e09d2305f0c518242472 100644 (file)
@@ -629,7 +629,7 @@ static int nrf51_write_page(struct flash_bank *bank, uint32_t offset, const uint
        struct flash_sector *sector = nrf51_find_sector_by_address(bank, offset);
 
        if (!sector)
-               goto error;
+               return ERROR_FLASH_SECTOR_INVALID;
 
        if (sector->is_protected)
                goto error;

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)