]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: imx-card: Fix refcount issue with of_node_put
authorShengjiu Wang <shengjiu.wang@nxp.com>
Tue, 13 Sep 2022 09:00:01 +0000 (17:00 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 13 Sep 2022 11:34:07 +0000 (12:34 +0100)
commit6f093f8369492dbfc22447112d72b093b7bba425
treec7b0cb54ba9eba71ea47884be65d0001270ba94a
parent7fdb11650c072c9009216fc67d6d3fafba843adb
ASoC: imx-card: Fix refcount issue with of_node_put

imx_card_parse_of will search all the node with loop,
if there is defer probe happen in the middle of loop,
the previous released codec node will be released
twice, then cause refcount issue.

Here assign NULL to pointer of released nodes to fix
the issue.

Fixes: 53eb042a8665 ("ASoC: imx-card: Add imx-card machine driver")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1663059601-29259-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/imx-card.c