From: Dan Carpenter Date: Tue, 25 Aug 2020 10:46:23 +0000 (+0300) Subject: ASoC: hdac_hdmi: tidy up a memset() X-Git-Tag: v5.10-rc3~22^2^2~160 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=672072976bf0db6e0aca5382bcf03bc90f439923;p=thirdparty%2Fkernel%2Flinux.git ASoC: hdac_hdmi: tidy up a memset() The ARRAY_SIZE() is the number of the elements but we want to use the number of bytes. Fortunately, in this case the value is the same so it doesn't affect runtime. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200825104623.GA278587@mwanda Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c index 869d1547ae5d6..c61cce53f5137 100644 --- a/sound/soc/codecs/hdac_hdmi.c +++ b/sound/soc/codecs/hdac_hdmi.c @@ -1474,7 +1474,7 @@ static int hdac_hdmi_eld_ctl_get(struct snd_kcontrol *kcontrol, struct hdac_hdmi_port *port; struct hdac_hdmi_eld *eld; - memset(ucontrol->value.bytes.data, 0, ARRAY_SIZE(ucontrol->value.bytes.data)); + memset(ucontrol->value.bytes.data, 0, sizeof(ucontrol->value.bytes.data)); pcm = get_hdmi_pcm_from_id(hdmi, kcontrol->id.device); if (!pcm) {