diff options
author | Jarkko Nikula <jarkko.nikula@linux.intel.com> | 2014-02-25 09:37:47 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-25 18:45:35 -0500 |
commit | 5069e5c93ca73eab185d3bb338a1362275f9ea70 (patch) | |
tree | c0d347fab5362f85101fba760178e3cebd438319 | |
parent | 20df8d03a7a6d71cc8c1fe54cf2c69b2d416423f (diff) |
ASoC: Intel: sst-acpi: Fix Oops in case of missing firmware
I swear I tested missing firmware in commit e5161d7987f1 ("ASoC: Intel:
sst-acpi: Request firmware before SST platform driver probing").
Unfortunately same wasn't done in commit 6dda27cbbd1d ("ASoC: Intel:
sst-acpi: Add support for multiple machine drivers per platform") which
will cause NULL pointer dereference in sst_acpi_fw_cb() when printing the
error since sst_acpi->mach is not set.
Fix this obvious error by setting the sst_acpi->mach in sst_acpi_probe().
Reported-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | sound/soc/intel/sst-acpi.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/intel/sst-acpi.c b/sound/soc/intel/sst-acpi.c index 0bb43169e146..5d06eecb6198 100644 --- a/sound/soc/intel/sst-acpi.c +++ b/sound/soc/intel/sst-acpi.c | |||
@@ -139,6 +139,7 @@ static int sst_acpi_probe(struct platform_device *pdev) | |||
139 | sst_pdata = &sst_acpi->sst_pdata; | 139 | sst_pdata = &sst_acpi->sst_pdata; |
140 | sst_pdata->id = desc->sst_id; | 140 | sst_pdata->id = desc->sst_id; |
141 | sst_acpi->desc = desc; | 141 | sst_acpi->desc = desc; |
142 | sst_acpi->mach = mach; | ||
142 | 143 | ||
143 | if (desc->resindex_dma_base >= 0) { | 144 | if (desc->resindex_dma_base >= 0) { |
144 | sst_pdata->dma_engine = desc->dma_engine; | 145 | sst_pdata->dma_engine = desc->dma_engine; |