summaryrefslogtreecommitdiff
path: root/sound/soc/amd/vangogh/acp5x-mach.c
diff options
context:
space:
mode:
authorLucas Tanure <lucas.tanure@collabora.com>2023-02-17 14:08:44 +0300
committerMark Brown <broonie@kernel.org>2023-03-06 02:37:19 +0300
commit50e81116ef576b58384c8829bd767b5decbc2968 (patch)
tree43fcf3ba3e339fa37dd22cf9897a73302bdb4793 /sound/soc/amd/vangogh/acp5x-mach.c
parentddd42a12a33eb4d6e9f90a75c50e5044c83b99cf (diff)
downloadlinux-50e81116ef576b58384c8829bd767b5decbc2968.tar.xz
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>
Diffstat (limited to 'sound/soc/amd/vangogh/acp5x-mach.c')
-rw-r--r--sound/soc/amd/vangogh/acp5x-mach.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/amd/vangogh/acp5x-mach.c b/sound/soc/amd/vangogh/acp5x-mach.c
index f914f6327cda..43c80103d138 100644
--- a/sound/soc/amd/vangogh/acp5x-mach.c
+++ b/sound/soc/amd/vangogh/acp5x-mach.c
@@ -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;