linux-stable/sound/soc/amd
Andy Shevchenko 7b1ed88ec3 ASoC: amd: acp-es8336: Drop reference count of ACPI device after use
[ Upstream commit d784fc8be6 ]

Theoretically the device might gone if its reference count drops to 0.
This might be the case when we try to find the first physical node of
the ACPI device. We need to keep reference to it until we get a result
of the above mentioned call. Refactor the code to drop the reference
count at the correct place.

While at it, move to acpi_dev_put() as symmetrical call to the
acpi_dev_get_first_match_dev().

Fixes: 02527c3f23 ("ASoC: amd: add Machine driver for Jadeite platform")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230112112356.67643-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-02-09 11:27:59 +01:00
..
acp ASoC: amd: acp: Fix possible UAF in acp_dma_open 2022-12-31 13:32:12 +01:00
include
ps ASoC: amd: enable Pink sardine platform machine driver build. 2022-08-29 23:14:17 +01:00
raven ASoC: amd: Migrate to new style legacy DAI naming flag 2022-06-27 13:16:30 +01:00
renoir ASoC: amd: Migrate to new style legacy DAI naming flag 2022-06-27 13:16:30 +01:00
rpl ASoC: amd: enable RPL Platform acp drivers build 2022-07-21 23:25:19 +01:00
vangogh ASoC: soc.h: remove num_cpus/codecs 2022-09-20 12:19:30 +01:00
yc ASoC: amd: yc: Add ASUS M5402RA into DMI table 2023-02-01 08:34:29 +01:00
acp-config.c ASoC: amd: acp: Add support for rt5682s and rt1019 card with hs instance 2022-06-06 12:35:01 +01:00
acp-da7219-max98357a.c ASoC: soc-card: Create jack kcontrol without pins 2022-04-14 17:37:21 +01:00
acp-es8336.c ASoC: amd: acp-es8336: Drop reference count of ACPI device after use 2023-02-09 11:27:59 +01:00
acp-pcm-dma.c ASoC: amd: add I2S MICSP instance support 2022-07-05 13:00:44 +01:00
acp-rt5645.c ASoC: soc-card: Create jack kcontrol without pins 2022-04-14 17:37:21 +01:00
acp.h ASoC: amd: add I2S MICSP instance support 2022-07-05 13:00:44 +01:00
acp3x-rt5682-max9836.c ASoC: soc-card: Create jack kcontrol without pins 2022-04-14 17:37:21 +01:00
Kconfig ASoC: amd: fix spelling mistake: "i.e" -> "i.e." 2022-08-30 18:59:12 +01:00
mach-config.h ASoC: amd: acp: Add support for nau8825 and max98360 card 2022-06-06 12:35:00 +01:00
Makefile ASoC: amd: enable Pink Sardine acp6.2 drivers build 2022-08-29 23:14:14 +01:00