X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fflash%2Fnor%2Ftms470.c;h=37f0933966062c667a6c338da7d6020e786d4e0f;hb=f24a283ac7765df6f09694a4cee99150cb645ac1;hp=50783148b35118a83c973ea7f3645372cf3a2d18;hpb=20b29b7767097f999fe2eb4f7fb6c2917e9f66a6;p=openocd.git diff --git a/src/flash/nor/tms470.c b/src/flash/nor/tms470.c index 50783148b3..37f0933966 100644 --- a/src/flash/nor/tms470.c +++ b/src/flash/nor/tms470.c @@ -437,7 +437,7 @@ static int tms470_try_flash_keys(struct target *target, const uint32_t *key_set) target_write_u32(target, 0xFFE89C0C, key_set[i]); } - if (ERROR_OK == tms470_check_flash_unlocked(target)) { + if (tms470_check_flash_unlocked(target) == ERROR_OK) { /* * There seems to be a side-effect of reading the FMPKEY * register in that it re-enables the protection. So we