aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm_adsp.c
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.cirrus.com>2021-06-26 16:59:41 +0100
committerMark Brown <broonie@kernel.org>2021-07-11 23:48:37 +0100
commit2ba907894f9e69b68e5934b57afb744482a72984 (patch)
tree3f75f969f7e72dc89425b1e4789284730ab81ffd /sound/soc/codecs/wm_adsp.c
parentASoC: codecs: wcd938x: fix returnvar.cocci warnings (diff)
downloadlinux-dev-2ba907894f9e69b68e5934b57afb744482a72984.tar.xz
linux-dev-2ba907894f9e69b68e5934b57afb744482a72984.zip
ASoC: wm_adsp: Remove pointless string comparison
The control fw_name is always directly assigned from the wm_adsp_fw_text array, so it isn't necessary to compare the actual strings just the pointer values. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210626155941.12251-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/wm_adsp.c')
-rw-r--r--sound/soc/codecs/wm_adsp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 549d98241dae..b395df1eb72d 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -2030,10 +2030,9 @@ static struct wm_coeff_ctl *wm_adsp_get_ctl(struct wm_adsp *dsp,
if (!pos->subname)
continue;
if (strncmp(pos->subname, name, pos->subname_len) == 0 &&
- strncmp(pos->fw_name, fw_txt,
- SNDRV_CTL_ELEM_ID_NAME_MAXLEN) == 0 &&
- pos->alg_region.alg == alg &&
- pos->alg_region.type == type) {
+ pos->fw_name == fw_txt &&
+ pos->alg_region.alg == alg &&
+ pos->alg_region.type == type) {
rslt = pos;
break;
}