X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Fflash%2Fnor%2Fkinetis.c;h=0b738e2db2a1c8ff24aba37f14d59f3e9ae7189f;hp=d02918b493cf82cfe58f4101c19818b734ac1f0d;hb=5fa3bfa074ccc826c51151ac5c306987c99bf2b2;hpb=9d98f8b7a7d0a4c1d50c1d5d9df62dc2d0ede26c diff --git a/src/flash/nor/kinetis.c b/src/flash/nor/kinetis.c index d02918b493..0b738e2db2 100644 --- a/src/flash/nor/kinetis.c +++ b/src/flash/nor/kinetis.c @@ -609,6 +609,9 @@ COMMAND_HANDLER(kinetis_check_flash_security_status) return ERROR_OK; } + if (!dap->ops) + return ERROR_OK; /* too early to check, in JTAG mode ops may not be initialised */ + uint32_t val; int retval; @@ -623,7 +626,7 @@ COMMAND_HANDLER(kinetis_check_flash_security_status) } if (val == 0) - return ERROR_OK; + return ERROR_OK; /* dap not yet initialised */ bool found = false; for (size_t i = 0; i < ARRAY_SIZE(kinetis_known_mdm_ids); i++) {