diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2018-10-27 02:19:59 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-11-13 16:27:48 -0800 |
commit | 496fa3ba0a66c0192be86a45f44f94827ab8bcb6 (patch) | |
tree | a882c810471dd7a0c6cc0b92f3c97645635a9c61 /sound/soc/stm | |
parent | 818ba93b0e9ed4a08cba575dd49c1391ef4b7776 (diff) | |
download | linux-496fa3ba0a66c0192be86a45f44f94827ab8bcb6.tar.bz2 |
ASoC: stm32: sai: fix invalid use of sizeof in stm32_sai_add_mclk_provider()
sizeof() when applied to a pointer typed expression gives the
size of the pointer, not that of the pointed data.
Fixes: 8307b2afd386 ("ASoC: stm32: sai: set sai as mclk clock provider")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/stm')
-rw-r--r-- | sound/soc/stm/stm32_sai_sub.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c index 506423d5861a..d4825700b63f 100644 --- a/sound/soc/stm/stm32_sai_sub.c +++ b/sound/soc/stm/stm32_sai_sub.c @@ -389,7 +389,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; |