Merge "ASoC: wcd_cpe_core: add size check for WDSP ELF files"
This commit is contained in:
commit
c3d005b001
1 changed files with 9 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License version 2 and
|
* it under the terms of the GNU General Public License version 2 and
|
||||||
|
@ -337,6 +337,14 @@ static int wcd_cpe_load_each_segment(struct wcd_cpe_core *core,
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (phdr->p_filesz != split_fw->size) {
|
||||||
|
dev_err(core->dev,
|
||||||
|
"%s: %s size mismatch, phdr_size: 0x%x fw_size: 0x%zx",
|
||||||
|
__func__, split_fname, phdr->p_filesz, split_fw->size);
|
||||||
|
ret = -EINVAL;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
segment->cpe_addr = phdr->p_paddr;
|
segment->cpe_addr = phdr->p_paddr;
|
||||||
segment->size = phdr->p_filesz;
|
segment->size = phdr->p_filesz;
|
||||||
segment->data = (u8 *) split_fw->data;
|
segment->data = (u8 *) split_fw->data;
|
||||||
|
|
Loading…
Add table
Reference in a new issue