linux-stable/sound/soc
Peter Ujfalusi f6c0ebc10c ASoC: SOF: sof-audio: prepare_widgets: Check swidget for NULL on sink failure
commit fb4293600c upstream.

If the swidget is NULL we skip the preparing of the widget and jump to
handle the sink path of the widget.
If the prepare fails in this case we would undo the prepare but the swidget
is NULL (we skipped the prepare for the widget).

To avoid NULL pointer dereference in this case we must check swidget
against NULL pointer once again.

Fixes: 0ad84b11f2 ("ASoC: SOF: sof-audio: skip prepare/unprepare if swidget is NULL")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230120102125.30653-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-09 11:28:26 +01:00
..
adi ASoC: adi: Migrate to new style legacy DAI naming flag 2022-06-27 13:16:34 +01:00
amd ASoC: amd: acp-es8336: Drop reference count of ACPI device after use 2023-02-09 11:27:59 +01:00
apple ASoC: apple: mca: Adjust timing of component unregister 2022-09-27 13:59:59 +01:00
atmel ASoC: mchp-spdiftx: Fix clang -Wbitfield-constant-conversion 2022-08-23 17:34:05 +01: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: codecs: wsa883x: correct playback min/max rates 2023-02-09 11:28:16 +01:00
dwc ASoC: dwc: Migrate to new style legacy DAI naming flag 2022-06-27 13:16:35 +01:00
fsl ASoC: fsl-asoc-card: Fix naming of AC'97 CODEC widgets 2023-02-01 08:34:31 +01:00
generic ASoC: audio-graph-card: fix refcount leak of cpu_ep in __graph_for_each_link() 2022-12-31 13:33:06 +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 ASoC: Intel: avs: Implement PCI shutdown 2023-02-09 11:28:00 +01:00
jz4740 ASoC: jz4740-i2s: Handle independent FIFO flush bits 2023-01-07 11:11:51 +01:00
kirkwood
mediatek ASoC: support machine driver with max98360 2023-02-01 08:34:29 +01:00
meson ASoC: meson: Remove now redundant non_legacy_dai_naming flag 2022-06-27 13:16:48 +01: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 null-pointer dereference in filter() 2022-12-31 13:32:11 +01:00
qcom ASoC: qcom: Fix building APQ8016 machine driver without SOUNDWIRE 2023-01-18 11:58:27 +01:00
rockchip ASoC: rockchip: spdif: Add missing clk_disable_unprepare() in rk_spdif_runtime_resume() 2022-12-31 13:33:07 +01:00
samsung ASoC: soc.h: remove num_cpus/codecs 2022-09-20 12:19:30 +01:00
sh ASoC: Updates for v6.1 2022-10-03 16:30:42 +02:00
sof ASoC: SOF: sof-audio: prepare_widgets: Check swidget for NULL on sink failure 2023-02-09 11:28:26 +01: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: fix declaration compile error 2022-09-21 10:28:19 +01:00
tegra ASoC: tegra: tegra20_das: Drop write-only driver data member 2022-07-05 19:54:00 +01:00
ti ASoC: ti: omap-mcbsp: remove useless assignment 2022-08-31 12:13:05 +01: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
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.h: remove num_cpus/codecs 2022-09-20 12:19:30 +01:00
soc-core.c ASoC: core: Fix use-after-free in snd_soc_exit() 2022-10-28 12:58:04 +01: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: Don't use prefix for regulator name 2022-10-26 14:17:34 +01:00
soc-devres.c
soc-generic-dmaengine-pcm.c ASoC: soc.h: remove num_cpus/codecs 2022-09-20 12:19:30 +01:00
soc-jack.c
soc-link.c
soc-ops.c ASoC: ops: Correct bounds check for second channel on SX controls 2022-11-25 16:29:33 +00:00
soc-pcm.c ASoC: soc-pcm: Add NULL check in BE reparenting 2022-11-22 12:23:00 +00: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: soc-core.c: setup rtd->pmdown_time at soc_new_pcm_runtime() 2022-09-19 17:52:41 +01: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: Remove __exit for snd_soc_util_exit() 2022-11-07 13:37:04 +00:00