Skip to contentSkip to conversation

ASoC: SOF: amd: add missing platform_device_unregister in acp_pci_rn_probe

PATCH In review Zheng Bin 3 participants 3 messages May 12, 2022

Subsystems (3)
lore
Share & tools
lore

Zheng Bin

author
#0 lore raw

PATCH 1/1 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.

---
 sound/soc/sof/amd/pci-rn.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/sof/amd/pci-rn.c +1 -0
index b8910bb7f27c..d5d9bcc2c997 100644
@@ -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

Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Zheng Bin

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

Thanks for the patch, nice catch

Quoted 19 lines
---
 sound/soc/sof/amd/pci-rn.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/sof/amd/pci-rn.c +1 -1
index b8910bb7f27c..d5d9bcc2c997 100644
@@ -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

maintainer
#2 lore raw
In reply to Zheng Bin
Quoted 4 lines · Zheng Bin

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

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: SOF: amd: add missing platform_device_unregister in acp_pci_rn_probe

      commit: cbcab8cd737c74c20195c31d647e19f7cb49c9b8

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark