From: Charles Keepax Date: Sat, 26 Jun 2021 15:59:41 +0000 (+0100) Subject: ASoC: wm_adsp: Remove pointless string comparison X-Git-Tag: v5.15-rc1~36^2^2~120 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2ba907894f9e69b68e5934b57afb744482a72984;p=thirdparty%2Fkernel%2Flinux.git 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 Link: https://lore.kernel.org/r/20210626155941.12251-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 549d98241daec..b395df1eb72d8 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; }