linux/sound/soc/intel
Liam Girdwood e9024f0ba3 ASoC: Intel: Fix check for pdata usage before dereference.
This patch fixes the following dereference check ordering.

 sound/soc/intel/sst-haswell-pcm.c:749 hsw_pcm_probe() warn: variable dereferenced before check 'pdata' (see line 746)

 git remote add asoc git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
 git remote update asoc
 git checkout 0b708c87f6
 vim +/pdata +749 sound/soc/intel/sst-haswell-pcm.c

 a4b12990 Mark Brown    2014-03-12  740  };
 a4b12990 Mark Brown    2014-03-12  741
 a4b12990 Mark Brown    2014-03-12  742  static int hsw_pcm_probe(struct snd_soc_platform *platform)
 a4b12990 Mark Brown    2014-03-12  743  {
 a4b12990 Mark Brown    2014-03-12  744  	struct sst_pdata *pdata = dev_get_platdata(platform->dev);
 a4b12990 Mark Brown    2014-03-12  745  	struct hsw_priv_data *priv_data;
 0b708c87 Liam Girdwood 2014-05-02 @746  	struct device *dma_dev = pdata->dma_dev;
 0b708c87 Liam Girdwood 2014-05-02  747  	int i, ret = 0;
 a4b12990 Mark Brown    2014-03-12  748
 a4b12990 Mark Brown    2014-03-12 @749  	if (!pdata)
 a4b12990 Mark Brown    2014-03-12  750  		return -ENODEV;
 a4b12990 Mark Brown    2014-03-12  751
 a4b12990 Mark Brown    2014-03-12  752  	priv_data = devm_kzalloc(platform->dev, sizeof(*priv_data), GFP_KERNEL);

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05 12:42:00 -07:00
..
byt-rt5640.c Merge remote-tracking branches 'asoc/topic/ml26124', 'asoc/topic/of', 'asoc/topic/omap', 'asoc/topic/pxa' and 'asoc/topic/rcar' into asoc-next 2014-03-12 23:04:35 +00:00
haswell.c Merge remote-tracking branches 'asoc/topic/ml26124', 'asoc/topic/of', 'asoc/topic/omap', 'asoc/topic/pxa' and 'asoc/topic/rcar' into asoc-next 2014-03-12 23:04:35 +00:00
Kconfig ASoC: Intel: don't select RT5640 if !I2C 2014-03-13 09:45:09 +00:00
Makefile Merge remote-tracking branches 'asoc/topic/ml26124', 'asoc/topic/of', 'asoc/topic/omap', 'asoc/topic/pxa' and 'asoc/topic/rcar' into asoc-next 2014-03-12 23:04:35 +00:00
mfld_machine.c ASoC: mfld_machine: Fix compile error 2014-03-21 19:33:36 +00:00
sst-acpi.c ASoC: Intel: Fix Audio DSP usage when IOMMU is enabled. 2014-05-02 09:53:02 -07:00
sst-baytrail-dsp.c Merge remote-tracking branches 'asoc/topic/ml26124', 'asoc/topic/of', 'asoc/topic/omap', 'asoc/topic/pxa' and 'asoc/topic/rcar' into asoc-next 2014-03-12 23:04:35 +00:00
sst-baytrail-ipc.c ASoC: Intel: Fix audio crash due to race condition in stream deletion 2014-04-23 12:11:20 +01:00
sst-baytrail-ipc.h Merge remote-tracking branches 'asoc/topic/ml26124', 'asoc/topic/of', 'asoc/topic/omap', 'asoc/topic/pxa' and 'asoc/topic/rcar' into asoc-next 2014-03-12 23:04:35 +00:00
sst-baytrail-pcm.c Merge remote-tracking branches 'asoc/topic/ml26124', 'asoc/topic/of', 'asoc/topic/omap', 'asoc/topic/pxa' and 'asoc/topic/rcar' into asoc-next 2014-03-12 23:04:35 +00:00
sst-dsp-priv.h ASoC: Intel: Fix Audio DSP usage when IOMMU is enabled. 2014-05-02 09:53:02 -07:00
sst-dsp.c ASoC: Intel: Fix Audio DSP usage when IOMMU is enabled. 2014-05-02 09:53:02 -07:00
sst-dsp.h ASoC: Intel: Fix Audio DSP usage when IOMMU is enabled. 2014-05-02 09:53:02 -07:00
sst-firmware.c ASoC: Intel: Fix Audio DSP usage when IOMMU is enabled. 2014-05-02 09:53:02 -07:00
sst-haswell-dsp.c ASoC: Intel: Fix Audio DSP usage when IOMMU is enabled. 2014-05-02 09:53:02 -07:00
sst-haswell-ipc.c ASoC: Intel: Fix stream position pointer. 2014-05-02 09:54:05 -07:00
sst-haswell-ipc.h ASoC: Intel: Fix stream position pointer. 2014-05-02 09:54:05 -07:00
sst-haswell-pcm.c ASoC: Intel: Fix check for pdata usage before dereference. 2014-05-05 12:42:00 -07:00
sst-mfld-dsp.h Merge remote-tracking branches 'asoc/topic/ml26124', 'asoc/topic/of', 'asoc/topic/omap', 'asoc/topic/pxa' and 'asoc/topic/rcar' into asoc-next 2014-03-12 23:04:35 +00:00
sst-mfld-platform.c Merge remote-tracking branches 'asoc/topic/ml26124', 'asoc/topic/of', 'asoc/topic/omap', 'asoc/topic/pxa' and 'asoc/topic/rcar' into asoc-next 2014-03-12 23:04:35 +00:00
sst-mfld-platform.h Merge remote-tracking branches 'asoc/topic/ml26124', 'asoc/topic/of', 'asoc/topic/omap', 'asoc/topic/pxa' and 'asoc/topic/rcar' into asoc-next 2014-03-12 23:04:35 +00:00