linux_dsm_epyc7002/sound/soc/qcom
Dan Carpenter 468b3a1ab2 ASoC: qcom: common: Fix refcounting in qcom_snd_parse_of()
[ Upstream commit 4e59dd249cd513a211e2ecce2cb31f4e29a5ce5b ]

There are two issues in this function.

1) We can't drop the refrences on "cpu", "codec" and "platform" before
   we take the reference.  This doesn't cause a problem on the first
   iteration because those pointers start as NULL so the of_node_put()
   is a no-op.  But on the subsequent iterations, it will lead to a use
   after free.

2) If the devm_kzalloc() allocation failed then the code returned
   directly instead of cleaning up.

Fixes: c1e6414cdc ("ASoC: qcom: common: Fix refcount imbalance on error")
Fixes: 1e36ea360a ("ASoC: qcom: common: use modern dai_link style")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20201105125154.GA176426@mwanda
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:53:06 +01:00
..
qdsp6 ASoC: q6afe-clocks: Fix typo in SPDX Licence 2020-09-28 11:32:13 +01:00
apq8016_sbc.c ASoC: qcom: Set card->owner to avoid warnings 2020-08-21 16:12:10 +01:00
apq8096.c ASoC: qcom: Set card->owner to avoid warnings 2020-08-21 16:12:10 +01:00
common.c ASoC: qcom: common: Fix refcounting in qcom_snd_parse_of() 2020-12-30 11:53:06 +01:00
common.h ASoC: qcom: remove unused header files from common.h 2018-08-06 12:50:07 +01:00
Kconfig ASoC: qcom: Add support for lpass hdmi driver 2020-10-08 20:27:34 +01:00
lpass-apq8016.c ASoC: qcom: Add support for lpass hdmi driver 2020-10-08 20:27:34 +01:00
lpass-cpu.c ASoC: qcom: Fix enabling BCLK and LRCLK in LPAIF invalid state 2020-11-23 18:37:34 +00:00
lpass-hdmi.c ASoC: qcom: fix unsigned int bitwidth compared to less than zero 2020-12-30 11:52:59 +01:00
lpass-hdmi.h ASoC: qcom: Add support for lpass hdmi driver 2020-10-08 20:27:34 +01:00
lpass-ipq806x.c ASoC: qcom: Add support for lpass hdmi driver 2020-10-08 20:27:34 +01:00
lpass-lpaif-reg.h ASoC: qcom: Fix enabling BCLK and LRCLK in LPAIF invalid state 2020-11-23 18:37:34 +00:00
lpass-platform.c ASoC: qcom: Fix enabling BCLK and LRCLK in LPAIF invalid state 2020-11-23 18:37:34 +00:00
lpass-sc7180.c ASoC: qcom: lpass-sc7180: Fix MI2S bitwidth field bit positions 2020-10-29 12:24:13 +00:00
lpass.h ASoC: qcom: Fix enabling BCLK and LRCLK in LPAIF invalid state 2020-11-23 18:37:34 +00:00
Makefile ASoC: qcom: Add support for lpass hdmi driver 2020-10-08 20:27:34 +01:00
sdm845.c ASoC: qcom: sdm845: set driver name correctly 2020-10-23 18:28:50 +01:00
storm.c ASoC: qcom: Set card->owner to avoid warnings 2020-08-21 16:12:10 +01:00