linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] ASoC: SOF: amd: add missing platform_device_unregister in acp_pci_rn_probe
@ 2022-05-12  1:37 Zheng Bin
  2022-05-12 13:13 ` Pierre-Louis Bossart
  2022-05-12 16:31 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Zheng Bin @ 2022-05-12  1:37 UTC (permalink / raw)
  To: pierre-louis.bossart, lgirdwood, ranjani.sridharan, kai.vehmanen,
	daniel.baluta, broonie, perex, tiwai, sound-open-firmware,
	alsa-devel, linux-kernel
  Cc: zhengbin13, gaochao49

acp_pci_rn_probe misses a call platform_device_unregister in error path,
this patch fixes that.

Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
---
 sound/soc/sof/amd/pci-rn.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/sof/amd/pci-rn.c b/sound/soc/sof/amd/pci-rn.c
index b8910bb7f27c..d5d9bcc2c997 100644
--- a/sound/soc/sof/amd/pci-rn.c
+++ b/sound/soc/sof/amd/pci-rn.c
@@ -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);
 	if (!res) {
 		sof_pci_remove(pci);
+		platform_device_unregister(dmic_dev);
 		return -ENOMEM;
 	}

--
2.31.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-12 16:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-12  1:37 [PATCH -next] ASoC: SOF: amd: add missing platform_device_unregister in acp_pci_rn_probe Zheng Bin
2022-05-12 13:13 ` Pierre-Louis Bossart
2022-05-12 16:31 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).