summaryrefslogtreecommitdiff
path: root/src/target/armv4_5.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/target/armv4_5.c')
-rw-r--r--src/target/armv4_5.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c
index eeb6694c..1a84a5f4 100644
--- a/src/target/armv4_5.c
+++ b/src/target/armv4_5.c
@@ -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__);