Skip to content
This repository has been archived by the owner on Feb 21, 2020. It is now read-only.

Commit

Permalink
nrf51: remove dereference of null pointer
Browse files Browse the repository at this point in the history
found by clang 3.4.

Change-Id: Id499b546f65acd7a719498bc97e33b21d1ba565a
Signed-off-by: Spencer Oliver <[email protected]>
Reviewed-on: http://openocd.zylin.com/2119
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <[email protected]>
Reviewed-by: Andrey Smirnov <[email protected]>
  • Loading branch information
ntfreak authored and paulfertser committed Apr 27, 2014
1 parent 7bd2959 commit cf094f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/flash/nor/nrf51.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cf094f2

Please sign in to comment.