mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-02 11:36:42 +07:00
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: 8307b2afd3
("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>
This commit is contained in:
parent
818ba93b0e
commit
496fa3ba0a
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user