projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e48ef67
)
ASoC: amd: acp: fix for acp_init function error handling
author
Vijendar Mukunda
<Vijendar.Mukunda@amd.com>
Fri, 29 Mar 2024 05:38:12 +0000
(11:08 +0530)
committer
Mark Brown
<broonie@kernel.org>
Fri, 29 Mar 2024 13:59:35 +0000
(13:59 +0000)
If acp_init() fails, acp pci driver probe should return error.
Add acp_init() function return value check logic.
Fixes:
e61b415515d3
("ASoC: amd: acp: refactor the acp init and de-init sequence")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link:
https://lore.kernel.org/r/20240329053815.2373979-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/amd/acp/acp-pci.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/soc/amd/acp/acp-pci.c
b/sound/soc/amd/acp/acp-pci.c
index 440b91d4f261cd3138d7a867c8338b39df70644d..5f35b90eab8d3f1aa46e6d4ea6bdd8d6d49638a7 100644
(file)
--- a/
sound/soc/amd/acp/acp-pci.c
+++ b/
sound/soc/amd/acp/acp-pci.c
@@
-115,7
+115,10
@@
static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
goto unregister_dmic_dev;
}
- acp_init(chip);
+ ret = acp_init(chip);
+ if (ret)
+ goto unregister_dmic_dev;
+
res = devm_kcalloc(&pci->dev, num_res, sizeof(struct resource), GFP_KERNEL);
if (!res) {
ret = -ENOMEM;