summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorVijendar Mukunda <Vijendar.Mukunda@amd.com>2024-03-29 08:38:12 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-10 17:36:00 +0300
commit04b52388c46dc87c46594fb18a6cd97f201ec2fb (patch)
tree37b4f4ad59b748b107b15d43e64cfd4fe0c2e663 /sound
parent3d3e148c7576a04d9f6e0899428ff78ceafd4344 (diff)
downloadlinux-04b52388c46dc87c46594fb18a6cd97f201ec2fb.tar.xz
ASoC: amd: acp: fix for acp_init function error handling
[ Upstream commit 2c603a4947a1247102ccb008d5eb6f37a4043c98 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/amd/acp/acp-pci.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/amd/acp/acp-pci.c b/sound/soc/amd/acp/acp-pci.c
index a32c14a109b7..223238f662f8 100644
--- a/sound/soc/amd/acp/acp-pci.c
+++ b/sound/soc/amd/acp/acp-pci.c
@@ -107,7 +107,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;