public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: hdac_hdmi: tidy up a memset()
@ 2020-08-25 10:46 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2020-08-25 10:46 UTC (permalink / raw)
  To: Liam Girdwood
  Cc: Guennadi Liakhovetski, alsa-devel, Kai Vehmanen, kernel-janitors,
	Pierre-Louis Bossart, Takashi Iwai, Mark Brown,
	Amadeusz Sławiński, Brent Lu

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 <dan.carpenter@oracle.com>
---
 sound/soc/codecs/hdac_hdmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index 869d1547ae5d..c61cce53f513 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) {
-- 
2.28.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-25 10:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-25 10:46 [PATCH] ASoC: hdac_hdmi: tidy up a memset() Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox