Skip to contentSkip to conversation

ASoC: mxs-saif: Fix refcount leak in mxs_saif_probe

PATCH In review Miaoqian Lin 2 participants 2 messages May 11, 2022 – May 12, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: mxs-saif: Fix refcount leak in mxs_saif_probe

of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when done.

Fixes 08641c7c74dd ("ASoC: mxs: add device tree support for mxs-saif")
---
 sound/soc/mxs/mxs-saif.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/mxs/mxs-saif.c +1 -0
index 879c1221a809..7afe1a1acc56 100644
@@ -754,6 +754,7 @@ static int mxs_saif_probe(struct platform_device *pdev)
 		saif->master_id = saif->id;
 	} else {
 		ret = of_alias_get_id(master, "saif");
+		of_node_put(master);
 		if (ret < 0)
 			return ret;
 		else
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 4 lines · Miaoqian Lin

of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when done.

Applied to

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

Thanks!

[1/1] ASoC: mxs-saif: Fix refcount leak in mxs_saif_probe

      commit: 2be84f73785fa9ed6443e3c5b158730266f1c2ee

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