mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 00:21:59 +00:00
ASoC: amd: vangogh: use sizeof of variable instead of struct type
Use sizeof(*machine) instead of sizeof(struct acp5x_platform_info) There is a possibility of bug when variable type has changed but corresponding struct passed to the sizeof has not. Signed-off-by: Lucas Tanure <lucas.tanure@collabora.com> Link: https://lore.kernel.org/r/20230217110850.1045250-4-lucas.tanure@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
ddd42a12a3
commit
50e81116ef
@ -342,7 +342,7 @@ static int acp5x_probe(struct platform_device *pdev)
|
||||
struct snd_soc_card *card;
|
||||
int ret;
|
||||
|
||||
machine = devm_kzalloc(dev, sizeof(struct acp5x_platform_info), GFP_KERNEL);
|
||||
machine = devm_kzalloc(dev, sizeof(*machine), GFP_KERNEL);
|
||||
if (!machine)
|
||||
return -ENOMEM;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user