Commit cbcab8cd authored by Zheng Bin's avatar Zheng Bin Committed by Mark Brown

ASoC: SOF: amd: add missing platform_device_unregister in acp_pci_rn_probe

acp_pci_rn_probe misses a call platform_device_unregister in error path,
this patch fixes that.
Signed-off-by: default avatarZheng Bin <zhengbin13@huawei.com>
Link: https://lore.kernel.org/r/20220512013728.4128903-1-zhengbin13@huawei.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent bf4a9b24
...@@ -101,6 +101,7 @@ static int acp_pci_rn_probe(struct pci_dev *pci, const struct pci_device_id *pci ...@@ -101,6 +101,7 @@ static int acp_pci_rn_probe(struct pci_dev *pci, const struct pci_device_id *pci
res = devm_kzalloc(&pci->dev, sizeof(struct resource) * ARRAY_SIZE(renoir_res), GFP_KERNEL); res = devm_kzalloc(&pci->dev, sizeof(struct resource) * ARRAY_SIZE(renoir_res), GFP_KERNEL);
if (!res) { if (!res) {
sof_pci_remove(pci); sof_pci_remove(pci);
platform_device_unregister(dmic_dev);
return -ENOMEM; return -ENOMEM;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment