Skip to contentSkip to conversation

sound: qcom: Fix missing of_node_put() in asoc_qcom_lpass_cpu_platform_probe()

PATCH In review Liang He 2 participants 4 messages Jul 4, 2022 – Jul 5, 2022

Subsystems (3)
lore
Share & tools
lore

Liang He

author
#0 lore raw

PATCH 1/1 sound: qcom: Fix missing of_node_put() in asoc_qcom_lpass_cpu_platform_probe()

We should call of_node_put() for the reference 'dsp_of_node' returned by of_parse_phandle() which will increase the refcount.

Fixes 9bae4880acee ("ASoC: qcom: move ipq806x specific bits out of lpass driver.")
---
 sound/soc/qcom/lpass-cpu.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/qcom/lpass-cpu.c +1 -0
index e6846ad2b5fa..964eb07f46d6 100644
@@ -1090,6 +1090,7 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev)
 	dsp_of_node = of_parse_phandle(pdev->dev.of_node, "qcom,adsp", 0);
 	if (dsp_of_node) {
 		dev_err(dev, "DSP exists and holds audio resources\n");
+		of_node_put(dsp_of_node);
 		return -EBUSY;
 	}
 
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 2 lines · Liang He

We should call of_node_put() for the reference 'dsp_of_node' returned by of_parse_phandle() which will increase the refcount.

Please submit patches using subject lines reflecting the style for the subsystem, this makes it easier for people to identify relevant patches. Look at what existing commits in the area you're changing are doing and make sure your subject lines visually resemble what they're doing. There's no need to resubmit to fix this alone.

author
#2 lore raw
Quoted 9 lines · Mark Brown
Quoted 2 lines · Liang He

We should call of_node_put() for the reference 'dsp_of_node' returned by of_parse_phandle() which will increase the refcount.

Please submit patches using subject lines reflecting the style for the subsystem, this makes it easier for people to identify relevant patches. Look at what existing commits in the area you're changing are doing and make sure your subject lines visually resemble what they're doing. There's no need to resubmit to fix this alone.

Thanks for your advice, I will follow this rule in future patch work.

Liang

maintainer
#3 lore raw
In reply to Liang He
Quoted 4 lines · Liang He

We should call of_node_put() for the reference 'dsp_of_node' returned by of_parse_phandle() which will increase the refcount.

Applied to

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

Thanks!

[1/1] sound: qcom: Fix missing of_node_put() in asoc_qcom_lpass_cpu_platform_probe()

      commit: f507c0c67dac57d2bcd5dcae4b6139b0305d8957

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