Skip to content

Commit

Permalink
adsp: common: simple file parser needs to increment block on error.
Browse files Browse the repository at this point in the history
Simple file parser does not increment block when it detects an error
in the current block. Make sure block is always incremented.

Signed-off-by: John Gunn <jgunn0262@gmail.com>
  • Loading branch information
jgunn0262 authored and lgirdwood committed Apr 26, 2019
1 parent 3129bf6 commit 57eac17
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hw/adsp/dsp/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ static int sof_module_memcpy(struct adsp_dev *adsp,

mem = adsp_get_mem_space(adsp, board->iram_base + block->offset - board->host_iram_offset);
if (!mem)
continue;
goto next;
memcpy(mem->ptr + block->offset - board->host_iram_offset,
(void *)block + sizeof(*block), block->size);
break;
Expand All @@ -186,7 +186,7 @@ static int sof_module_memcpy(struct adsp_dev *adsp,

mem = adsp_get_mem_space(adsp, board->dram_base + block->offset - board->host_dram_offset);
if (!mem)
continue;
goto next;
memcpy(mem->ptr + block->offset - board->host_dram_offset,
(void *)block + sizeof(*block), block->size);
break;
Expand All @@ -200,7 +200,7 @@ static int sof_module_memcpy(struct adsp_dev *adsp,
"block %d type 0x%x size 0x%x ==> offset 0x%x\n",
count, block->type, block->size, block->offset);


next:
/* next block */
block = (void *)block + sizeof(*block) + block->size;
}
Expand Down

0 comments on commit 57eac17

Please sign in to comment.