linux/sound/soc/fsl
Nathan Chancellor f4662e6d51
ASoC: fsl: lpc3xxx-i2s: Avoid using ret uninitialized in lpc32xx_i2s_probe()
clang points out that ret may be used uninitialized in
lpc32xx_i2s_probe() in an error pointer path (which becomes fatal with
CONFIG_WERROR):

  sound/soc/fsl/lpc3xxx-i2s.c:326:47: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized]
    326 |                                      "failed to init register map: %d\n", ret);
        |                                                                           ^~~
  sound/soc/fsl/lpc3xxx-i2s.c:310:9: note: initialize the variable 'ret' to silence this warning
    310 |         int ret;
        |                ^
        |                 = 0
  1 error generated.

One solution would be a small refactoring of the second parameter in
dev_err_probe(), PTR_ERR(i2s_info_p->regs), to be the value of ret in
the if statement. However, a nicer solution for debugging purposes,
which is the point of this statement, would be to use the '%pe'
specifier to symbolically print the error pointer value. Do so, which
eliminates the uninitialized use of ret, clearing up the warning.

Fixes: 0959de657a ("ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://patch.msgid.link/20240701-lpc32xx-asoc-fix-uninitialized-ret-v1-1-985d86189739@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-07-01 17:50:50 +01:00
..
efika-audio-fabric.c ASoC: Explicitly include correct DT includes 2023-10-09 13:13:56 +01:00
eukrea-tlv320.c ASoC: fsl: use devm_snd_soc_register_card() 2024-01-22 00:06:02 +00:00
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: convert not to use asoc_xxx() 2023-09-25 14:16:20 +02:00
fsl_asrc.c ASoC: fsl: merge DAI call back functions into ops 2023-08-14 13:10:07 +01:00
fsl_asrc.h ASoC: fsl_asrc: Move common definition to fsl_asrc_common 2020-04-21 16:34:09 +01:00
fsl_aud2htx.c ASoC: fsl: fsl_aud2htx: Switch to RUNTIME_PM_OPS() 2024-05-27 01:31:21 +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: Split playback and capture stream to different DAI 2024-06-26 17:48:13 +01:00
fsl_audmix.h ASoC: fsl_audmix: Add spin lock to protect tdms 2019-11-11 13:01:37 +00:00
fsl_dma.c ASoC: fsl: convert not to use asoc_xxx() 2023-09-25 14:16:20 +02:00
fsl_dma.h
fsl_easrc.c ASoC: fsl: fsl_easrc: Switch to RUNTIME_PM_OPS() 2024-05-27 01:31:22 +01:00
fsl_easrc.h ASoC: fsl_easrc: use snd_pcm_format_t type for sample_format 2022-07-21 13:38:51 +01:00
fsl_esai.c ASoC: fsl: merge DAI call back functions into ops 2023-08-14 13:10:07 +01:00
fsl_esai.h
fsl_micfil.c ASoC: fsl: merge DAI call back functions into ops 2023-08-14 13:10:07 +01:00
fsl_micfil.h ASoC: Merge up fixes 2023-08-10 00:19:02 +01:00
fsl_mqs.c ASoC: fsl_mqs: Add i.MX95 platform support 2024-05-28 18:23:38 +01:00
fsl_qmc_audio.c soc: fsl: cpm1: qmc: Extend the API to provide Rx status 2023-12-12 10:29:20 +01:00
fsl_rpmsg.c ASoC: fsl_rpmsg: Add support for i.MX95 platform 2024-07-01 13:12:35 +01:00
fsl_rpmsg.h ASoC: fsl_rpmsg: add soc specific data structure 2021-09-13 01:59:15 +01:00
fsl_sai.c ASoC: fsl_sai: Add separate DAI for transmitter and receiver 2024-06-26 17:48:12 +01:00
fsl_sai.h ASoC: fsl_sai: Add separate DAI for transmitter and receiver 2024-06-26 17:48:12 +01:00
fsl_spdif.c ASoC: Explicitly include correct DT includes 2023-10-09 13:13:56 +01:00
fsl_spdif.h ASoC: fsl_spdif: Add support for 22.05 kHz sample rate 2023-07-19 18:47:18 +01:00
fsl_ssi_dbg.c ASoC: fsl: fsl_ssi_dbg: remove spurious kernel-doc comment start 2020-07-03 16:09:24 +01:00
fsl_ssi.c ASoC: fsl: fsl_ssi: Add dev_err_probe if PCM DMA init fails 2024-03-25 14:18:34 +00:00
fsl_ssi.h
fsl_utils.c ASoC: fsl: fsl-utils: remove useless assignment 2022-08-31 12:13:03 +01:00
fsl_utils.h ASoC: fsl_utils: Add function to handle PLL clock source 2022-07-05 13:00:37 +01:00
fsl_xcvr.c ASoC: fsl_xcvr: Add support for i.MX95 platform 2024-06-03 17:04:40 +01:00
fsl_xcvr.h ASoC: fsl_xcvr: Add support for i.MX95 platform 2024-06-03 17:04:40 +01:00
fsl-asoc-card.c ASoC: fsl-asoc-card: set priv->pdev before using it 2024-06-20 16:11:19 +01:00
imx-audio-rpmsg.c ASoC: fsl: Let imx-audio-rpmsg register platform device for card 2024-03-25 00:32:50 +00:00
imx-audmix.c ASoC: imx-audmix: Split capture device for audmix 2024-06-26 17:48:14 +01:00
imx-audmux.c ASoC: Explicitly include correct DT includes 2023-10-09 13:13:56 +01:00
imx-audmux.h
imx-card.c ASoC: fsl: Use snd_soc_substream_to_rtd() for accessing private_data 2024-05-06 23:59:51 +09:00
imx-es8328.c ASoC: fsl: Remove unused of_gpio.h 2024-06-10 12:48:37 +01:00
imx-hdmi.c ASoC: fsl: Use snd_soc_substream_to_rtd() for accessing private_data 2024-05-06 23:59:51 +09:00
imx-pcm-dma.c ASoC: fsl: add missing MODULE_DESCRIPTION() macro 2024-06-03 15:59:20 +01:00
imx-pcm-fiq.c ASoC: fsl: imx-pcm-fiq: add missing MODULE_DESCRIPTION() macro 2024-06-17 13:08:28 +01:00
imx-pcm-rpmsg.c ASoC: Constify static snd_pcm_hardware 2024-05-07 23:38:40 +09: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 ASoC: fsl: Remove unused inline function imx_pcm_dma_params_init_data() 2022-09-23 13:56:25 +01:00
imx-rpmsg.c ASoC: fsl: Remove unused of_gpio.h 2024-06-10 12:48:37 +01:00
imx-sgtl5000.c ASoC: fsl: convert not to use asoc_xxx() 2023-09-25 14:16:20 +02:00
imx-spdif.c ASoC: fsl: convert not to use asoc_xxx() 2023-09-25 14:16:20 +02:00
imx-ssi.h dmaengine: imx: Move header to include/dma/ 2022-04-19 12:06:18 +01:00
Kconfig ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs 2024-06-28 13:39:23 +01:00
lpc3xxx-i2s.c ASoC: fsl: lpc3xxx-i2s: Avoid using ret uninitialized in lpc32xx_i2s_probe() 2024-07-01 17:50:50 +01:00
lpc3xxx-i2s.h ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs 2024-06-28 13:39:23 +01:00
lpc3xxx-pcm.c ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs 2024-06-28 13:39:23 +01:00
Makefile ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs 2024-06-28 13:39:23 +01:00
mpc5200_dma.c ASoC: fsl: mpc5200_dma.c: Fix warning of Function parameter or member not described 2023-10-10 12:39:37 +01:00
mpc5200_dma.h
mpc5200_psc_ac97.c ASoC: Explicitly include correct DT includes 2023-10-09 13:13:56 +01:00
mpc5200_psc_i2s.c ASoC: Explicitly include correct DT includes 2023-10-09 13:13:56 +01:00
p1022_ds.c ASoC: Explicitly include correct DT includes 2023-10-09 13:13:56 +01:00
p1022_rdk.c ASoC: p1022_rdk: fix all kernel-doc warnings 2024-01-22 00:06:39 +00:00
pcm030-audio-fabric.c ASoC: Explicitly include correct DT includes 2023-10-09 13:13:56 +01:00