const struct elf32_phdr *phdrs;
const struct elf32_phdr *phdr;
const struct elf32_hdr *ehdr;
+ const struct firmware *seg_fw;
size_t fw_name_len;
char *fw_name;
void *ptr;
if (phdr->p_filesz) {
sprintf(fw_name + fw_name_len - 3, "b%02d", i);
- ret = request_firmware(&fw, fw_name, &rproc->dev);
+ ret = request_firmware(&seg_fw, fw_name, &rproc->dev);
if (ret) {
dev_err(&rproc->dev, "failed to load %s\n",
fw_name);
break;
}
- memcpy(ptr, fw->data, fw->size);
+ memcpy(ptr, seg_fw->data, seg_fw->size);
- release_firmware(fw);
+ release_firmware(seg_fw);
}
if (phdr->p_memsz > phdr->p_filesz)