diff options
author | Daniel Baluta <daniel.baluta@nxp.com> | 2018-11-09 11:35:46 +0200 |
---|---|---|
committer | Dong Aisheng <aisheng.dong@nxp.com> | 2019-11-25 15:52:13 +0800 |
commit | 4bff2e7204131a99510cfbaa4397c633ac7ab47a (patch) | |
tree | 49f3f405556ee2d085b4a80c693743f2597b47fd /sound/soc/fsl/fsl_dsp.c | |
parent | f5f13e4c2c78efb8dda749aeedbc4b51ee9694ee (diff) |
MLK-20189-6: ASoC: fsl: Skip checking for string section type
e_shstrndx already contains the section header index, so
shdr->sh_type will always be SHT_STRTAB.
Remove this redundant check and make Coverity happy.
Fixes: CID3901026
Reviewed-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Diffstat (limited to 'sound/soc/fsl/fsl_dsp.c')
-rw-r--r-- | sound/soc/fsl/fsl_dsp.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/fsl/fsl_dsp.c b/sound/soc/fsl/fsl_dsp.c index bd180d9356e6..3825fe5e2e59 100644 --- a/sound/soc/fsl/fsl_dsp.c +++ b/sound/soc/fsl/fsl_dsp.c @@ -657,8 +657,7 @@ static void dsp_load_firmware(const struct firmware *fw, void *context) shdr = (Elf32_Shdr *)(addr + ehdr->e_shoff + (ehdr->e_shstrndx * sizeof(Elf32_Shdr))); - if (shdr->sh_type == SHT_STRTAB) - strtab = (unsigned char *)(addr + shdr->sh_offset); + strtab = (unsigned char *)(addr + shdr->sh_offset); /* Load each appropriate section */ for (i = 0; i < ehdr->e_shnum; ++i) { |