[alsa-devel] [PATCH] ASoC: Intel: sst-acpi: Fix Oops in case of missing firmware
Jarkko Nikula
jarkko.nikula at linux.intel.com
Tue Feb 25 15:37:47 CET 2014
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 at linux.intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula at linux.intel.com>
---
sound/soc/intel/sst-acpi.c | 1 +
1 file changed, 1 insertion(+)
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)
sst_pdata = &sst_acpi->sst_pdata;
sst_pdata->id = desc->sst_id;
sst_acpi->desc = desc;
+ sst_acpi->mach = mach;
if (desc->resindex_dma_base >= 0) {
sst_pdata->dma_engine = desc->dma_engine;
--
1.8.5.3
More information about the Alsa-devel
mailing list