WSL2-Linux-Kernel/sound/soc/fsl
Elinor Montmasson 544ab46b7e ASoC: fsl-asoc-card: set priv->pdev before using it
[ Upstream commit 90f3feb24172185f1832636264943e8b5e289245 ]

priv->pdev pointer was set after being used in
fsl_asoc_card_audmux_init().
Move this assignment at the start of the probe function, so
sub-functions can correctly use pdev through priv.

fsl_asoc_card_audmux_init() dereferences priv->pdev to get access to the
dev struct, used with dev_err macros.
As priv is zero-initialised, there would be a NULL pointer dereference.
Note that if priv->dev is dereferenced before assignment but never used,
for example if there is no error to be printed, the driver won't crash
probably due to compiler optimisations.

Fixes: 708b4351f0 ("ASoC: fsl: Add Freescale Generic ASoC Sound Card with ASRC support")
Signed-off-by: Elinor Montmasson <elinor.montmasson@savoirfairelinux.com>
Link: https://patch.msgid.link/20240620132511.4291-2-elinor.montmasson@savoirfairelinux.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-07-05 09:14:40 +02:00
..
Kconfig Merge branch 'for-5.13' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.14 2021-05-25 16:44:26 +01:00
Makefile ASoC: imx-card: Add imx-card machine driver 2021-05-20 17:57:30 +01:00
efika-audio-fabric.c
eukrea-tlv320.c ASoC: eureka-tlv320: Hold reference returned from of_find_xxx API 2022-10-26 12:34:55 +02:00
fsl-asoc-card.c ASoC: fsl-asoc-card: set priv->pdev before using it 2024-07-05 09:14:40 +02:00
fsl_asrc.c ASoC: fsl_asrc fsl_esai fsl_sai: allow CONFIG_PM=N 2022-12-02 17:40:59 +01:00
fsl_asrc.h
fsl_asrc_common.h ASoC: fsl_asrc_dma: Fix data copying speed issue with EDMA 2020-06-12 14:18:04 +01:00
fsl_asrc_dma.c ASoC: fsl_asrc_dma: fix potential null-ptr-deref 2023-04-26 13:51:56 +02:00
fsl_aud2htx.c ASoC: fsl_aud2htx: Use devm_platform_get_and_ioremap_resource() 2021-06-21 13:03:12 +01:00
fsl_aud2htx.h ASoC: fsl_aud2htx: Add aud2htx module driver 2020-11-05 17:06:16 +00:00
fsl_audmix.c ASoC: fsl_audmix: Don't use devm_regmap_init_mmio_clk 2021-03-24 19:49:31 +00:00
fsl_audmix.h
fsl_dma.c ASoC: fsl_dma: Use managed buffer allocation 2021-08-04 08:09:09 +02:00
fsl_dma.h
fsl_easrc.c ASoC: fsl: Fix PM disable depth imbalance in fsl_easrc_probe 2023-11-20 11:08:23 +01:00
fsl_easrc.h ASoC: fsl_easrc: use snd_pcm_format_t type for sample_format 2022-08-17 14:24:10 +02:00
fsl_esai.c ASoC: fsl_asrc fsl_esai fsl_sai: allow CONFIG_PM=N 2022-12-02 17:40:59 +01:00
fsl_esai.h
fsl_micfil.c ASoC: fsl_micfil: Fix error handler with pm_runtime_enable 2023-05-24 17:36:49 +01:00
fsl_micfil.h
fsl_mqs.c ASoC: fsl_mqs: move of_node_put() to the correct location 2023-05-11 23:00:33 +09:00
fsl_rpmsg.c ASoC: fsl_rpmsg: Fix error handler with pm_runtime_enable 2024-01-15 18:51:11 +01:00
fsl_rpmsg.h ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg 2021-03-25 13:58:07 +00:00
fsl_sai.c ASoC: fsl_sai: Disable bit clock with transmitter 2023-07-27 08:46:55 +02:00
fsl_sai.h ASoC: fsl_sai: Disable bit clock with transmitter 2023-07-27 08:46:55 +02:00
fsl_spdif.c ASoC: fsl_spdif: Silence output on stop 2023-08-03 10:22:38 +02:00
fsl_spdif.h ASoC: fsl_spdif: add support for enabling raw capture mode 2021-05-10 13:05:31 +01:00
fsl_ssi.c ASoC: fsl_ssi: Rename AC'97 streams to avoid collisions with AC'97 CODEC 2023-02-01 08:27:17 +01:00
fsl_ssi.h
fsl_ssi_dbg.c ASoC: fsl: fsl_ssi_dbg: remove spurious kernel-doc comment start 2020-07-03 16:09:24 +01:00
fsl_utils.c
fsl_utils.h
fsl_xcvr.c ASoC: fsl_xcvr: Fix channel swap issue with ARC 2021-09-21 13:23:36 +01:00
fsl_xcvr.h ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver 2020-10-26 15:45:31 +00:00
imx-audio-rpmsg.c ASoC: imx-audio-rpmsg: use module_rpmsg_driver to simplify the code 2021-06-03 13:59:57 +01:00
imx-audmix.c ASoC: imx-audmix: Fix return error with devm_clk_get() 2023-10-06 13:18:05 +02:00
imx-audmux.c ASoC: imx-audmux: Silence a clang warning 2022-08-17 14:24:02 +02:00
imx-audmux.h
imx-card.c ASoC: imx-card: Fix refcount issue with of_node_put 2022-10-05 10:39:41 +02:00
imx-es8328.c ASoC: imx-es8328: Fix error return code in imx_es8328_probe() 2022-04-08 14:23:22 +02:00
imx-hdmi.c ASoC: imx-hdmi: Fix refcount leak in imx_hdmi_probe 2022-06-09 10:22:56 +02:00
imx-pcm-dma.c
imx-pcm-fiq.c ASoC: fsl: imx-pcm-fiq: Use managed buffer allocation 2021-08-04 08:08:42 +02:00
imx-pcm-rpmsg.c ASoC: fsl: imx-pcm-rpmsg: Add SNDRV_PCM_INFO_BATCH flag 2023-10-06 13:18:17 +02:00
imx-pcm-rpmsg.h ASoC: imx-pcm-rpmsg: Fix warning of incorrect type in assignment 2021-05-10 13:05:38 +01:00
imx-pcm.h
imx-rpmsg.c ASoC: imx-rpmsg: Set ignore_pmdown_time for dai_link 2023-10-06 13:18:18 +02:00
imx-sgtl5000.c ASoC: fsl: Fix refcount leak in imx_sgtl5000_probe 2022-06-09 10:22:56 +02:00
imx-spdif.c ASoC: fsl: Use dev_err_probe() helper 2022-06-09 10:22:56 +02:00
imx-ssi.h
mpc5200_dma.c ASoC: fsl: mpc5200_dma.c: Fix warning of Function parameter or member not described 2023-11-20 11:08:23 +01:00
mpc5200_dma.h
mpc5200_psc_ac97.c
mpc5200_psc_i2s.c ASoC: fsl: use asoc_substream_to_rtd() 2020-07-23 19:07:31 +01:00
mpc8610_hpcd.c ASoC: fsl: mpc8610: remove useless assignment 2021-03-10 13:06:42 +00:00
p1022_ds.c ASoC: fsl: p1022_ds: remove useless assignment 2021-03-10 13:06:43 +00:00
p1022_rdk.c ASoC: fsl: use asoc_substream_to_rtd() 2020-07-23 19:07:31 +01:00
pcm030-audio-fabric.c ASoC: fsl: Add missing error handling in pcm030_fabric_probe 2022-02-08 18:34:10 +01:00