[alsa-devel] [PATCH] ASoC: stm32: sai: fix noderef.cocci warnings

kbuild test robot fengguang.wu at intel.com
Tue Oct 23 14:20:22 CEST 2018


From: kbuild test robot <fengguang.wu at intel.com>

sound/soc/stm/stm32_sai_sub.c:393:26-32: ERROR: application of sizeof to pointer

 sizeof when applied to a pointer typed expression gives the size of
 the pointer

Generated by: scripts/coccinelle/misc/noderef.cocci

Fixes: 8307b2afd386 ("ASoC: stm32: sai: set sai as mclk clock provider")
CC: Olivier Moysan <olivier.moysan at st.com>
Signed-off-by: kbuild test robot <fengguang.wu at intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-4.20
head:   6be0f96d799f487f05eb412d362d5a1747d665c2
commit: 8307b2afd386ccce369821daa2196068c47fe8cd [519/528] ASoC: stm32: sai: set sai as mclk clock provider

 stm32_sai_sub.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/sound/soc/stm/stm32_sai_sub.c
+++ b/sound/soc/stm/stm32_sai_sub.c
@@ -390,7 +390,7 @@ static int stm32_sai_add_mclk_provider(s
 	char *mclk_name, *p, *s = (char *)pname;
 	int ret, i = 0;
 
-	mclk = devm_kzalloc(dev, sizeof(mclk), GFP_KERNEL);
+	mclk = devm_kzalloc(dev, sizeof(*mclk), GFP_KERNEL);
 	if (!mclk)
 		return -ENOMEM;
 


More information about the Alsa-devel mailing list