ASoC: cros_ec_codec: Fix refcount leak in cros_ec_codec_platform_probe
Subsystems (4)
PATCH v2 1/1 ASoC: cros_ec_codec: Fix refcount leak in cros_ec_codec_platform_probe
of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak.
---
changes in v2:
- update Fixes tag
v1 Link: https://lore.kernel.org/r/[email protected]
--- sound/soc/codecs/cros_ec_codec.c | 1 + 1 file changed, 1 insertion(+)
sound/soc/codecs/cros_ec_codec.c +1 -0
@@ -995,6 +995,7 @@ static int cros_ec_codec_platform_probe(struct platform_device *pdev)dev_dbg (dev,"ap_shm_phys_addr=%#llx len=%#x\n" , priv->ap_shm_phys_addr, priv->ap_shm_len); } +of_node_put (node); }#endif
Signature · 1 line
2.25.1
Quoted 7 lines · Miaoqian Lin
of_parse_phandle()returns a node pointer with refcount incremented, we should useof_node_put()on it when not need anymore. Add missingof_node_put()to avoid refcount leak.Fixes b6bc07d4360d ("ASoC: cros_ec_codec: support WoV")Signed-off-by Miaoqian Lin <[email protected]>
Quoted 23 lines
---
changes in v2:
- update Fixes tag
v1 Link: https://lore.kernel.org/r/[email protected]--- sound/soc/codecs/cros_ec_codec.c | 1 + 1 file changed, 1 insertion(+)sound/soc/codecs/cros_ec_codec.c +1
-1@@ -995,6 +995,7 @@ static int cros_ec_codec_platform_probe(struct platform_device *pdev)dev_dbg (dev,"ap_shm_phys_addr=%#llx len=%#x\n" , priv->ap_shm_phys_addr, priv->ap_shm_len); } +of_node_put (node); }#endif --2.25.1
Quoted 6 lines · Miaoqian Lin
of_parse_phandle()returns a node pointer with refcount incremented, we should useof_node_put()on it when not need anymore. Add missingof_node_put()to avoid refcount leak.Fixes b6bc07d4360d ("ASoC: cros_ec_codec: support WoV")Signed-off-by Miaoqian Lin <[email protected]>
Mark Brown
maintainerQuoted 5 lines · Miaoqian Lin
of_parse_phandle()returns a node pointer with refcount incremented, we should useof_node_put()on it when not need anymore. Add missingof_node_put()to avoid refcount leak.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: cros_ec_codec: Fix refcount leak in cros_ec_codec_platform_probe
commit: 0a034d93ee929a9ea89f3fa5f1d8492435b9ee6e
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