of_find_device_by_node() returns the ASRC platform device with a reference taken, but asrc_pdev is only used during probe to set up the DPCM DAI links and is never released. The shared exit path already drops the CPU device reference, so release the ASRC one there too, covering both the error paths and the successful registration path. Fixes: 708b4351f08c ("ASoC: fsl: Add Freescale Generic ASoC Sound Card with ASRC support") Cc: stable@vger.kernel.org Signed-off-by: Wentao Liang --- sound/soc/fsl/fsl-asoc-card.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index 70a6159430ed..3fdc77d5968b 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -1069,6 +1069,8 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) of_node_put(asrc_np); of_node_put(codec_np[0]); of_node_put(codec_np[1]); + if (asrc_pdev) + put_device(&asrc_pdev->dev); put_device(&cpu_pdev->dev); fail: of_node_put(cpu_np); -- 2.34.1