]> git.sur5r.net Git - openocd/blobdiff - src/target/armv4_5.c
cortex a8: add missing error handling
[openocd] / src / target / armv4_5.c
index eeb6694c93c28fd1590425ba409de19be51b4a63..1a84a5f4e77b34680e06f4ff7c0ff3a07c054545 100644 (file)
@@ -820,11 +820,9 @@ static int jim_mcrmrc(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
        struct arm *arm;
        int retval;
 
-       context = Jim_GetAssocData(interp, "context");
-       if (context == NULL) {
-               LOG_ERROR("%s: no command context", __func__);
-               return JIM_ERR;
-       }
+       context = current_command_context(interp);
+       assert( context != NULL);
+
        target = get_current_target(context);
        if (target == NULL) {
                LOG_ERROR("%s: no current target", __func__);