linux/sound/soc/fsl
Shengjiu Wang 5f37671e00 ASoC: fsl-asoc-card: Fix build warning for maybe-uninitialized
When build fsl-asoc-card as module, there is following error:

sound/soc/fsl/fsl-asoc-card.c: In function 'fsl_asoc_card_probe':
>> sound/soc/fsl/fsl-asoc-card.c:547:13: warning: 'asrc_np' may be used uninitialized in this function [-Wmaybe-uninitialized]
     of_node_put(asrc_np);
                ^

vim +/asrc_np +547 sound/soc/fsl/fsl-asoc-card.c

   531                  if (width == 24)
   532                          priv->asrc_format = SNDRV_PCM_FORMAT_S24_LE;
   533                  else
   534                          priv->asrc_format = SNDRV_PCM_FORMAT_S16_LE;
   535          }
   536
   537          /* Finish card registering */
   538          platform_set_drvdata(pdev, priv);
   539          snd_soc_card_set_drvdata(&priv->card, priv);
   540
   541          ret = devm_snd_soc_register_card(&pdev->dev, &priv->card);
   542          if (ret)
   543                  dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
   544
   545  fail:
   546          of_node_put(codec_np);
 > 547          of_node_put(asrc_np);
   548          of_node_put(cpu_np);
   549
   550          return ret;
   551  }
   552
   553  static const struct of_device_id fsl_asoc_card_dt_ids[] = {
   554          { .compatible = "fsl,imx-audio-cs42888", },
   555          { .compatible = "fsl,imx-audio-sgtl5000", },

Add 'asrc_fail' branch for error jump after asrc_np initialized.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-18 09:52:51 -05:00
..
efika-audio-fabric.c
eukrea-tlv320.c ASoC: eukrea-tlv320: Add DT support. 2014-03-03 12:27:52 +08:00
fsl_asrc_dma.c ASoC: fsl_sarc_dma: Check pair before using it 2014-08-04 15:48:41 +01:00
fsl_asrc.c ASoC: fsl_asrc: Don't access members of config before checking it 2014-08-04 15:48:41 +01:00
fsl_asrc.h ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers 2014-07-29 19:22:49 +01:00
fsl_dma.c ASoC: fsl: Fix build problem 2014-06-12 00:34:16 +01:00
fsl_dma.h
fsl_esai.c ASoC: fsl_esai: Add stream names for DPCM usage 2014-07-31 20:55:04 +01:00
fsl_esai.h ASoC: fsl-esai: fix ESAI TDM slot setting 2014-02-10 13:39:18 +00:00
fsl_sai.c Merge remote-tracking branches 'asoc/topic/fsl', 'asoc/topic/fsl-asrc', 'asoc/topic/fsl-spdif' and 'asoc/topic/imx-audmux' into asoc-next 2014-08-04 16:31:40 +01:00
fsl_sai.h ASoC: fsl_sai: Add clock controls for SAI 2014-04-14 17:26:05 +01:00
fsl_spdif.c Merge remote-tracking branches 'asoc/topic/fsl', 'asoc/topic/fsl-asrc', 'asoc/topic/fsl-spdif' and 'asoc/topic/imx-audmux' into asoc-next 2014-08-04 16:31:40 +01:00
fsl_spdif.h ASoC: fsl_spdif: Add support for output sample rates 96kHz and 192kHz 2014-06-17 15:36:54 +01:00
fsl_ssi_dbg.c ASoC: fsl-ssi: Move debugging to seperate file 2014-05-20 23:02:26 +01:00
fsl_ssi.c Merge remote-tracking branches 'asoc/topic/fsl', 'asoc/topic/fsl-asrc', 'asoc/topic/fsl-spdif' and 'asoc/topic/imx-audmux' into asoc-next 2014-08-04 16:31:40 +01:00
fsl_ssi.h ASoC: fsl-ssi: Use regmap 2014-06-01 11:55:08 +01:00
fsl_utils.c ASoC: fsl-utils: Add fsl_asoc_xlate_tdm_slot_mask() support. 2014-03-25 13:06:43 +00:00
fsl_utils.h ASoC: fsl-utils: Add fsl_asoc_xlate_tdm_slot_mask() support. 2014-03-25 13:06:43 +00:00
fsl-asoc-card.c ASoC: fsl-asoc-card: Fix build warning for maybe-uninitialized 2014-08-18 09:52:51 -05:00
imx-audmux.c ASoC: imx-audmux: Use uintptr_t for port numbers 2014-08-04 16:30:24 +01:00
imx-audmux.h ASoC: imx-audmux: Move definitions to dt-bindings 2013-08-16 11:05:17 +01:00
imx-es8328.c ASoC: fsl: add imx-es8328 machine driver 2014-08-16 17:18:07 -05:00
imx-mc13783.c ASoC: fsl: fix pm support of machine drivers 2014-02-10 13:18:37 +00:00
imx-pcm-dma.c Update imx-sdma cyclic handling to report residue 2014-07-01 12:23:42 +05:30
imx-pcm-fiq.c ASoC: fsl: imx-pcm-fiq: Remove unneeded 'out' label 2014-02-24 14:41:15 +09:00
imx-pcm.h ASoC: fsl: Use devm_snd_dmaengine_pcm_register() 2013-12-02 11:48:54 +00:00
imx-sgtl5000.c ASoC: fsl: fix pm support of machine drivers 2014-02-10 13:18:37 +00:00
imx-spdif.c Merge remote-tracking branches 'asoc/topic/ad1836', 'asoc/topic/ad193x', 'asoc/topic/adav80x', 'asoc/topic/adsp', 'asoc/topic/ak4641', 'asoc/topic/ak4642', 'asoc/topic/arizona', 'asoc/topic/atmel', 'asoc/topic/au1x', 'asoc/topic/axi', 'asoc/topic/bcm2835', 'asoc/topic/blackfin', 'asoc/topic/cs4271', 'asoc/topic/cs42l52', 'asoc/topic/da7210', 'asoc/topic/davinci', 'asoc/topic/ep93xx', 'asoc/topic/fsl', 'asoc/topic/fsl-mxs', 'asoc/topic/generic', 'asoc/topic/hdmi', 'asoc/topic/jack', 'asoc/topic/jz4740', 'asoc/topic/max98090', 'asoc/topic/mxs', 'asoc/topic/omap', 'asoc/topic/pxa', 'asoc/topic/rcar', 'asoc/topic/s6000', 'asoc/topic/sai', 'asoc/topic/samsung', 'asoc/topic/sgtl5000', 'asoc/topic/spear', 'asoc/topic/ssm2518', 'asoc/topic/ssm2602', 'asoc/topic/tegra', 'asoc/topic/tlv320aic3x', 'asoc/topic/twl6040', 'asoc/topic/txx9', 'asoc/topic/uda1380', 'asoc/topic/width', 'asoc/topic/wm8510', 'asoc/topic/wm8523', 'asoc/topic/wm8580', 'asoc/topic/wm8711', 'asoc/topic/wm8728', 'asoc/topic/wm8731', 'asoc/topic/wm8741', 'asoc/topic/wm8750', 'asoc/topic/wm8753', 'asoc/topic/wm8776', 'asoc/topic/wm8804', 'asoc/topic/wm8900', 'asoc/topic/wm8901', 'asoc/topic/wm8940', 'asoc/topic/wm8962', 'asoc/topic/wm8974', 'asoc/topic/wm8985', 'asoc/topic/wm8988', 'asoc/topic/wm8990', 'asoc/topic/wm8991', 'asoc/topic/wm8994', 'asoc/topic/wm8995', 'asoc/topic/wm9081' and 'asoc/topic/x86' into asoc-next 2014-01-02 13:01:55 +00:00
imx-ssi.c ASoC: imx-ssi: Add .xlate_tdm_slot_mask() support. 2014-03-25 13:06:43 +00:00
imx-ssi.h ASoC: fsl: imx-ssi: omit ssi counter to avoid harm in unbalanced situation 2013-12-02 11:57:02 +00:00
imx-wm8962.c ASoC: fsl: fix pm support of machine drivers 2014-02-10 13:18:37 +00:00
Kconfig ASoC: fsl: add imx-es8328 machine driver 2014-08-16 17:18:07 -05:00
Makefile ASoC: fsl: add imx-es8328 machine driver 2014-08-16 17:18:07 -05:00
mpc5200_dma.c ASoC: fsl: Don't set unused struct snd_pcm_hardware fields 2014-01-07 11:40:24 +00:00
mpc5200_dma.h ASoC: fsl: mpc5200 combine psc_dma platform data 2012-09-18 23:03:42 -04:00
mpc5200_psc_ac97.c drivers: clean-up prom.h implicit includes 2013-10-09 20:04:04 -05:00
mpc5200_psc_ac97.h
mpc5200_psc_i2s.c ASoC: fsl: Don't mix SNDRV_PCM_RATE_CONTINUOUS with specific rates 2014-01-14 20:42:26 +00:00
mpc8610_hpcd.c drivers: clean-up prom.h implicit includes 2013-10-09 20:04:04 -05:00
mx27vis-aic32x4.c ASoC: fsl: remove use of imx-pcm-audio from imx-ssi 2013-05-15 09:27:27 +04:00
p1022_ds.c drivers: clean-up prom.h implicit includes 2013-10-09 20:04:04 -05:00
p1022_rdk.c drivers: clean-up prom.h implicit includes 2013-10-09 20:04:04 -05:00
pcm030-audio-fabric.c ASoC: fsl: set correct platform drvdata in pcm030_fabric_probe() 2013-12-02 11:13:19 +00:00
phycore-ac97.c ASoC: fsl: remove use of imx-fiq-pcm-audio from imx-ssi 2013-05-15 09:27:27 +04:00
wm1133-ev1.c ASoC: wm1133-ev1: Convert to table based DAPM setup 2014-03-03 16:06:20 +08:00