diff options
author | Lokesh Vutla <lokeshvutla@ti.com> | 2019-09-04 16:01:28 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-10-11 10:07:34 -0400 |
commit | 14d963d1b51fc7a57b8d561588f163d7cae8ed81 (patch) | |
tree | defff9e9b73fe3343a136bb7d2e62b7e9738a5c6 /drivers/remoteproc/stm32_copro.c | |
parent | c08eb936263c67312cb55c354277f9dc3433b194 (diff) |
remoteproc: elf_loader: Always check the validity of the image before loading
rproc_elf32_load_image() rely on user to send a valid address for elf loading.
Instead do a sanity check on the address passed by user. This will help
all rproc elf users to not call sanity_check explicitly before calling
elf_loading.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Fabien Dessenne <fabien.dessenne@st.com>
Diffstat (limited to 'drivers/remoteproc/stm32_copro.c')
-rw-r--r-- | drivers/remoteproc/stm32_copro.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/remoteproc/stm32_copro.c b/drivers/remoteproc/stm32_copro.c index 71895daf9c..40bba37211 100644 --- a/drivers/remoteproc/stm32_copro.c +++ b/drivers/remoteproc/stm32_copro.c @@ -155,14 +155,7 @@ static int stm32_copro_load(struct udevice *dev, ulong addr, ulong size) return ret; } - /* Support only ELF32 image */ - ret = rproc_elf32_sanity_check(addr, size); - if (ret) { - dev_err(dev, "Invalid ELF32 image (%d)\n", ret); - return ret; - } - - return rproc_elf32_load_image(dev, addr); + return rproc_elf32_load_image(dev, addr, size); } /** |