ASoC: stm32: sai: fix noderef.cocci warnings
authorkbuild test robot <fengguang.wu@intel.com>
Tue, 23 Oct 2018 12:20:22 +0000 (20:20 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 24 Oct 2018 10:27:19 +0000 (11:27 +0100)
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@st.com>
Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/stm/stm32_sai_sub.c

index ea05cc91aa05d8d14a402769928cb9119a8c9147..211589b0b2ef5400276d689599134bd02919691d 100644 (file)
@@ -390,7 +390,7 @@ static int stm32_sai_add_mclk_provider(struct stm32_sai_sub_data *sai)
        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;