|
@@ -1097,7 +1097,7 @@ static int load_slim_core_fw(const struct firmware *fw, void *context)
|
|
Elf32_Ehdr *ehdr;
|
|
Elf32_Ehdr *ehdr;
|
|
Elf32_Phdr *phdr;
|
|
Elf32_Phdr *phdr;
|
|
u8 __iomem *dst;
|
|
u8 __iomem *dst;
|
|
- int err, i;
|
|
|
|
|
|
+ int err = 0, i;
|
|
|
|
|
|
if (!fw || !context)
|
|
if (!fw || !context)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
@@ -1106,7 +1106,7 @@ static int load_slim_core_fw(const struct firmware *fw, void *context)
|
|
phdr = (Elf32_Phdr *)(fw->data + ehdr->e_phoff);
|
|
phdr = (Elf32_Phdr *)(fw->data + ehdr->e_phoff);
|
|
|
|
|
|
/* go through the available ELF segments */
|
|
/* go through the available ELF segments */
|
|
- for (i = 0; i < ehdr->e_phnum && !err; i++, phdr++) {
|
|
|
|
|
|
+ for (i = 0; i < ehdr->e_phnum; i++, phdr++) {
|
|
|
|
|
|
/* Only consider LOAD segments */
|
|
/* Only consider LOAD segments */
|
|
if (phdr->p_type != PT_LOAD)
|
|
if (phdr->p_type != PT_LOAD)
|