Skip to content

Commit 2c603a4

Browse files
vijendarmukundabroonie
authored andcommitted
ASoC: amd: acp: fix for acp_init function error handling
If acp_init() fails, acp pci driver probe should return error. Add acp_init() function return value check logic. Fixes: e61b415 ("ASoC: amd: acp: refactor the acp init and de-init sequence") Signed-off-by: Vijendar Mukunda <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent e48ef67 commit 2c603a4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sound/soc/amd/acp/acp-pci.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
115115
goto unregister_dmic_dev;
116116
}
117117

118-
acp_init(chip);
118+
ret = acp_init(chip);
119+
if (ret)
120+
goto unregister_dmic_dev;
121+
119122
res = devm_kcalloc(&pci->dev, num_res, sizeof(struct resource), GFP_KERNEL);
120123
if (!res) {
121124
ret = -ENOMEM;

0 commit comments

Comments
 (0)