[0/5] ASoC: fix error-path leaks and a NULL dereference

Message ID 20261107160815352Q4eO0zXOX0KF5AwEbOJ6f@zte.com.cn (mailing list archive)
Headers
Series ASoC: fix error-path leaks and a NULL dereference |

Message

shao.mingyin@zte.com.cn Nov. 7, 2026, 8:08 a.m. UTC
Five error-path defects in ASoC drivers, found while reviewing against
linux-next next-20261030.  Four of them leak a reference or a clock, or
drop one twice, on a path that is easy to miss; the fifth dereferences
a NULL remote port while parsing an audio graph.  The patches are
independent and can be reviewed, applied and backported separately.

  1/5 ASoC: rsnd: fix NULL dereference when remote port has no endpoint
  2/5 ASoC: wcd9335: fix SLIM interface device double-put on error paths
  3/5 ASoC: rockchip: rk3399_gru_sound: fix codec node reference leak
  4/5 ASoC: sun8i-codec: fix bus clock leak in runtime resume error path
  5/5 ASoC: rsnd: fix SSIU node reference leak in rsnd_dma_of_path

1/5 returns early when a graph endpoint has no remote port; 2/5 removes
the four manual put_device() calls that duplicate the devm action; 3/5
puts the codec node on the two skip paths of the Rockchip DAI-link
parse; 4/5 disables the bus clock when the regmap sync fails; 5/5 puts
the SSIU node after the DMA path lookup.

Patches 1/5 and 5/5 are R-Car (Kuninori Morimoto), 2/5 is the WCD9335
codec (Srinivas Kandagatla), 3/5 is Rockchip (Heiko Stuebner) and 4/5
is sunxi (Chen-Yu Tsai, Jernej Skrabec, Samuel Holland).  All go
through the ASoC tree.

3/5 was tested on 7.3.0-next-20261030 in a QEMU/TCG arm64 guest with a
synthetic DT; the test section in that patch describes the setup and
the observed reference counts.

Shao Mingyin (5):
  ASoC: rsnd: fix NULL dereference when remote port has no endpoint
  ASoC: wcd9335: fix SLIM interface device double-put on error paths
  ASoC: rockchip: rk3399_gru_sound: fix codec node reference leak
  ASoC: sun8i-codec: fix bus clock leak in runtime resume error path
  ASoC: rsnd: fix SSIU node reference leak in rsnd_dma_of_path

 sound/soc/codecs/wcd9335.c            | 4 ----
 sound/soc/renesas/rcar/core.c         | 2 ++
 sound/soc/renesas/rcar/dma.c          | 5 ++++-
 sound/soc/rockchip/rk3399_gru_sound.c | 8 ++++++--
 sound/soc/sunxi/sun8i-codec.c         | 1 +
 5 files changed, 13 insertions(+), 7 deletions(-)

---
base-commit: 7649ba73f9e7e1e04d0b46213e39c79ae09dd55c
  

Comments

Mark Brown Nov. 9, 2026, 12:24 p.m. UTC | #1
On Sat, 07 Nov 2026 16:08:15 +0800, shao.mingyin@zte.com.cn wrote:
> ASoC: fix error-path leaks and a NULL dereference
> 
> Five error-path defects in ASoC drivers, found while reviewing against
> linux-next next-20261030.  Four of them leak a reference or a clock, or
> drop one twice, on a path that is easy to miss; the fifth dereferences
> a NULL remote port while parsing an audio graph.  The patches are
> independent and can be reviewed, applied and backported separately.
> 
> [...]

Applied to

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

Thanks!

[1/5] ASoC: rsnd: fix NULL dereference when remote port has no endpoint
      https://git.kernel.org/broonie/sound/c/ea3277e4a3d9
[2/5] ASoC: wcd9335: fix SLIM interface device double-put on error paths
      https://git.kernel.org/broonie/sound/c/b5aa000ab9f4
[3/5] ASoC: rockchip: rk3399_gru_sound: fix codec node reference leak
      https://git.kernel.org/broonie/sound/c/1ae5920938f2
[4/5] ASoC: sun8i-codec: fix bus clock leak in runtime resume error path
      https://git.kernel.org/broonie/sound/c/a32aac41b8ae
[5/5] ASoC: rsnd: fix SSIU node reference leak in rsnd_dma_of_path
      https://git.kernel.org/broonie/sound/c/e64753959a3e

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