linux/sound/soc
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
..
adi
atmel Merge remote-tracking branches 'asoc/topic/atmel', 'asoc/topic/cirrus' and 'asoc/topic/cleanup' into asoc-next 2014-08-04 16:31:29 +01:00
au1x MIPS: Alchemy: remove au_read/write/sync 2014-07-30 13:56:34 +02:00
bcm
blackfin ASoC: blackfin: use samples to set silence 2014-07-17 12:27:56 +01:00
cirrus
codecs ASoC: add es8328 codec driver 2014-08-16 17:17:13 -05:00
davinci ASoC: davinci: Enable menuconfig entry for McASP 2014-08-04 16:28:30 +01:00
dwc
fsl ASoC: fsl-asoc-card: Fix build warning for maybe-uninitialized 2014-08-18 09:52:51 -05:00
generic ASoC: simple-card: Make u32 DT parameter handling 64-bit proof 2014-06-21 11:06:53 +01:00
intel Merge remote-tracking branches 'asoc/topic/intel', 'asoc/topic/kirkwood', 'asoc/topic/max98090' and 'asoc/topic/mc13783' into asoc-next 2014-08-04 16:31:45 +01:00
jz4740
kirkwood ASoC: kirkwood: Remove ARCH_KIRKWOOD dependency 2014-07-29 20:35:23 +01:00
mxs
nuc900
omap Merge remote-tracking branches 'asoc/topic/omap', 'asoc/topic/oom' and 'asoc/topic/pxa' into asoc-next 2014-08-04 16:31:50 +01:00
pxa Merge remote-tracking branches 'asoc/topic/omap', 'asoc/topic/oom' and 'asoc/topic/pxa' into asoc-next 2014-08-04 16:31:50 +01:00
rockchip ASoC: rockchip: remove redundant dev_err call in rockchip_i2s_probe() 2014-07-28 14:46:20 +01:00
s6000 ASoC: s6105-ipcam: Fix build for I2C dependencies 2014-07-05 18:00:34 +01:00
samsung ARM: SoC cleanups for 3.17 2014-08-08 11:00:26 -07:00
sh Merge remote-tracking branches 'asoc/topic/rt5670', 'asoc/topic/rt5677', 'asoc/topic/s6000', 'asoc/topic/samsung' and 'asoc/topic/sh-fsi' into asoc-next 2014-08-04 16:32:01 +01:00
sirf ASoC: sirf-usp: Fixed a bug for playback and capture work at the same time 2014-07-25 18:54:44 +01:00
spear
tegra ASoC: tegra: Replace instances of rtd->codec->card with rtd->card 2014-07-22 23:15:57 +01:00
txx9
ux500
Kconfig ASoC: add driver for Rockchip RK3xxx I2S controller 2014-07-09 09:39:29 +02:00
Makefile ASoC: add driver for Rockchip RK3xxx I2S controller 2014-07-09 09:39:29 +02:00
soc-cache.c ASoC: Move name and id from CODEC/platform to component 2014-06-21 21:04:24 +01:00
soc-compress.c ASoC: compress: Prevent multicodec for compressed stream 2014-07-16 23:06:27 +01:00
soc-core.c Merge remote-tracking branches 'asoc/topic/tlv', 'asoc/topic/tlv320aic23', 'asoc/topic/tlv320aic31xx' and 'asoc/topic/tlv320aic32x4' into asoc-next 2014-08-04 16:32:12 +01:00
soc-dapm.c ASoC: Move card field form platform/codec to component 2014-07-22 23:15:57 +01:00
soc-devres.c
soc-generic-dmaengine-pcm.c ASoC: generic-dmaengine-pcm: Prepare formats mask for valid physical sample sizes 2014-07-04 18:55:21 +01:00
soc-io.c
soc-jack.c ASoC: Move card field form platform/codec to component 2014-07-22 23:15:57 +01:00
soc-pcm.c Merge remote-tracking branch 'asoc/topic/component' into asoc-next 2014-08-04 16:31:15 +01:00
soc-utils.c