aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwen yang <[email protected]>2019-02-02 14:53:16 +0000
committerMark Brown <[email protected]>2019-02-04 10:03:44 +0100
commit11907e9d3533648615db08140e3045b829d2c141 (patch)
treebd93a90ab92f07a549e053be2490dd9258b70be4
parent411db2ab7df35804422e4b26c5849b3868e6a038 (diff)
ASoC: fsl-asoc-card: fix object reference leaks in fsl_asoc_card_probe
The of_find_device_by_node() takes a reference to the underlying device structure, we should release that reference. Signed-off-by: Wen Yang <[email protected]> Cc: Timur Tabi <[email protected]> Cc: Nicolin Chen <[email protected]> Cc: Xiubo Li <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: Liam Girdwood <[email protected]> Cc: Mark Brown <[email protected]> Cc: Jaroslav Kysela <[email protected]> Cc: Takashi Iwai <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/fsl/fsl-asoc-card.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
index 81f2fe2c6d23..60f87a0d99f4 100644
--- a/sound/soc/fsl/fsl-asoc-card.c
+++ b/sound/soc/fsl/fsl-asoc-card.c
@@ -689,6 +689,7 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
asrc_fail:
of_node_put(asrc_np);
of_node_put(codec_np);
+ put_device(&cpu_pdev->dev);
fail:
of_node_put(cpu_np);