Skip to contentSkip to conversation

ASoC: SOF: ipc4-topology: Fix application of sizeof to pointer

PATCH New [email protected] 1 participant 1 message Jul 19, 2023 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 ASoC: SOF: ipc4-topology: Fix application of sizeof to pointer

Sizeof is being applied to the pointer ptr, not the integer it points to.

Eliminate the following error(s):
./sound/soc/sof/ipc4-topology.c:221:29-35: ERROR: application of sizeof to pointer

---
 sound/soc/sof/ipc4-topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/sof/ipc4-topology.c +1 -1
index a4e1a70b607d..2dbe87dbd239 100644
@@ -218,7 +218,7 @@ static int sof_ipc4_get_audio_fmt(struct snd_soc_component *scomp,
 
     ret = sof_update_ipc_object(scomp, available_fmt,
                     SOF_AUDIO_FMT_NUM_TOKENS, swidget->tuples,
-                    swidget->num_tuples, sizeof(available_fmt), 1);
+                    swidget->num_tuples, sizeof(*available_fmt), 1);
     if (ret) {
         dev_err(scomp->dev, "Failed to parse audio format token 
count\n");
         return ret;