linux-stable/sound/soc
Aleksandr Mishin 1ba9856cf7 ASoC: amd: Adjust error handling in case of absent codec device
[ Upstream commit 5080808c33 ]

acpi_get_first_physical_node() can return NULL in several cases (no such
device, ACPI table error, reference count drop to 0, etc).
Existing check just emit error message, but doesn't perform return.
Then this NULL pointer is passed to devm_acpi_dev_add_driver_gpios()
where it is dereferenced.

Adjust this error handling by adding error code return.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 02527c3f23 ("ASoC: amd: add Machine driver for Jadeite platform")
Signed-off-by: Aleksandr Mishin <amishin@t-argos.ru>
Link: https://patch.msgid.link/20240703191007.8524-1-amishin@t-argos.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-03 08:49:21 +02:00
..
adi ASoC: adi: Migrate to new style legacy DAI naming flag 2022-06-27 13:16:34 +01:00
amd ASoC: amd: Adjust error handling in case of absent codec device 2024-08-03 08:49:21 +02:00
apple ASoC: apple: mca: Improve handling of unavailable DMA channels 2023-03-11 13:55:31 +01:00
atmel ASoC: atmel: Fix the 8K sample parameter in I2SC master 2023-09-13 09:42:22 +02:00
au1x ASoC: au1x: Migrate to new style legacy DAI naming flag 2022-06-27 13:16:39 +01:00
bcm ASoC: bcm2835-i2s: Switch to use dev_err_probe() helper 2022-09-14 15:06:00 +01:00
cirrus ASoC: ep93xx: Migrate to new style legacy DAI naming flag 2022-06-27 13:16:20 +01:00
codecs ASoC: max98088: Check for clk_prepare_enable() error 2024-08-03 08:49:20 +02:00
dwc ASoC: dwc: move DMA init to snd_soc_dai_driver probe() 2023-06-21 16:00:53 +02:00
fsl ASoC: fsl-asoc-card: set priv->pdev before using it 2024-07-05 09:31:45 +02:00
generic ASoC: simple-card: fixup asoc_simple_probe() error handling 2023-11-08 14:10:57 +01:00
hisilicon ASoC: hisilicon: Migrate to new style legacy DAI naming flag 2022-06-27 13:16:24 +01:00
img ASoC: Refactor non_legacy_dai_naming flag 2022-06-29 16:58:08 +01:00
intel bytcr_rt5640 : inverse jack detect for Archos 101 cesium 2024-07-25 09:49:14 +02:00
jz4740 ASoC: jz4740-i2s: Handle independent FIFO flush bits 2023-01-07 11:11:51 +01:00
kirkwood ASoC: kirkwood: Fix potential NULL dereference 2024-06-12 11:03:22 +02:00
mediatek ASoC: mediatek: mt8192: fix register configuration for tdm 2024-06-12 11:03:49 +02:00
meson ASoC: meson: cards: select SND_DYNAMIC_MINORS 2024-05-17 11:56:00 +02:00
mxs ASoC: mxs-saif: Migrate to new style legacy DAI naming flag 2022-06-27 13:16:43 +01:00
pxa ASoC: pxa: fix a memory leak in probe() 2023-10-25 12:03:15 +02:00
qcom ASoC: qcom: Adjust issues in case of DT error in asoc_qcom_lpass_cpu_platform_probe() 2024-08-03 08:49:20 +02:00
rockchip ASoC: rockchip: i2s-tdm: Fix trcm mode by setting clock on right mclk 2024-07-05 09:31:44 +02:00
samsung ASoC: soc.h: remove num_cpus/codecs 2022-09-20 12:19:30 +01:00
sh ASoC: Use of_property_read_bool() for boolean properties 2023-10-19 23:08:51 +02:00
sof ASoC: SOF: sof-audio: Skip unprepare for in-use widgets on error rollback 2024-07-25 09:49:15 +02:00
spear ASoC: spear: Migrate to new style legacy DAI naming flag 2022-06-27 13:16:18 +01:00
sprd
sti ASoC: sti-uniperf: Migrate to new style legacy DAI naming flag 2022-06-27 13:16:29 +01:00
stm ASoC: stm32: i2s: remove irqf_oneshot flag 2022-11-10 17:50:52 +00:00
sunxi ASoC: sunxi: sun4i-spdif: Add support for Allwinner H616 2024-03-01 13:26:27 +01:00
tegra ASoC: tegra: Fix DSPK 16-bit playback 2024-05-17 11:56:20 +02:00
ti ASoC: ti: omap-hdmi: Fix too long driver name 2024-07-25 09:49:14 +02:00
uniphier ASoC: uniphier: Remove now redundant non_legacy_dai_naming flag 2022-06-27 13:16:55 +01:00
ux500 ASoC: ux500: Migrate to new style legacy DAI naming flag 2022-06-27 13:16:41 +01:00
xilinx ASoC: xilinx: Suppress second error message about reset failure in .remove() 2022-07-05 16:44:31 +01:00
xtensa ASoC: xtensa: Migrate to new style legacy DAI naming flag 2022-06-27 13:16:33 +01:00
Kconfig ASoC: apple: mca: Start new platform driver 2022-08-25 13:51:34 +01:00
Makefile ASoC: apple: mca: Start new platform driver 2022-08-25 13:51:34 +01:00
soc-ac97.c ASoC: Variable type completion 2022-08-17 13:00:27 +01:00
soc-acpi.c
soc-card.c ASoC: Introduce 'fixup_controls' card method 2022-06-10 13:32:20 +01:00
soc-component.c Revert "ASoC: soc-component: using pm_runtime_resume_and_get instead of pm_runtime_get_sync" 2022-10-04 14:09:30 +01:00
soc-compress.c ASoC: soc-compress: Inherit atomicity from DAI link for Compress FE 2023-05-11 23:03:28 +09:00
soc-core.c ASoC: soc-core.c: Skip dummy codec when adding platforms 2024-04-13 13:05:19 +02:00
soc-dai.c ASoC: Change handling of unimplemented set_bclk_ratio 2022-08-19 13:19:59 +01:00
soc-dapm.c ASoC: dapm: fix clock get name 2023-11-20 11:52:18 +01:00
soc-devres.c
soc-generic-dmaengine-pcm.c ALSA: dmaengine: Synchronize dma channel after drop() 2024-07-25 09:49:14 +02:00
soc-jack.c
soc-link.c
soc-ops.c ASoC: ops: Fix wraparound for mask in snd_soc_get_volsw 2024-04-10 16:28:31 +02:00
soc-pcm.c ASoC: soc-pcm: test if a BE can be prepared 2023-06-21 16:00:53 +02:00
soc-topology-test.c ASoC: topology: KUnit: Remove now redundant non_legacy_dai_naming flag 2022-06-27 13:16:54 +01:00
soc-topology.c ASoC: topology: Do not assign fields that are already set 2024-07-25 09:49:14 +02:00
soc-utils-test.c ASoC: soc-utils-test: Add test for snd_soc_params_to_bclk() 2022-08-17 15:19:14 +01:00
soc-utils.c ASoC: soc-utils: Export snd_soc_dai_is_dummy() symbol 2023-10-10 22:00:34 +02:00