Laurentiu Cocanu - memory read/write and exit() error path fixes

git-svn-id: svn://svn.berlios.de/openocd/trunk@1064 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
oharboe
2008-10-15 11:44:36 +00:00
parent af41e6aac8
commit ccc2e3fe76
15 changed files with 406 additions and 131 deletions

View File

@@ -533,10 +533,10 @@ int target_init(struct command_context_s *cmd_ctx)
target->type->examine = default_examine;
}
if (target->type->init_target(cmd_ctx, target) != ERROR_OK)
if ((retval = target->type->init_target(cmd_ctx, target)) != ERROR_OK)
{
LOG_ERROR("target '%s' init failed", target->type->name);
exit(-1);
return retval;
}
/* Set up default functions if none are provided by target */