mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
ASoC: samsung: aries_audio_probe: double of_node_put due to direct assignment without of_node_get
In aries_audio_probe(), aries_dai[0].platforms->of_node is assigned the
same pointer as aries_dai[0].cpus->of_node (from of_parse_phandle)
without calling of_node_get(). When the sound card is deregistered, the
ASoC framework calls of_node_put() on both cpus->of_node and
platforms->of_node, causing a double put on the same node and a refcount
underflow.
Add of_node_get(aries_dai[0].cpus->of_node) before the assignment.
Cc: stable@vger.kernel.org
Fixes: 7a3a7671fa ("ASoC: samsung: Add driver for Aries boards")
Signed-off-by: WenTao Liang <vulab@iscas.ac.cn>
Link: https://patch.msgid.link/20260627035251.60172-1-vulab@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
e487b00d70
commit
fb5d1b1c5f
|
|
@ -658,6 +658,7 @@ static int aries_audio_probe(struct platform_device *pdev)
|
|||
goto out;
|
||||
}
|
||||
|
||||
of_node_get(aries_dai[0].cpus->of_node);
|
||||
aries_dai[0].platforms->of_node = aries_dai[0].cpus->of_node;
|
||||
|
||||
/* Set CPU of_node for BT DAI */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user