提交 5069e5c9 编写于 作者: J Jarkko Nikula 提交者: Mark Brown

ASoC: Intel: sst-acpi: Fix Oops in case of missing firmware

I swear I tested missing firmware in commit e5161d79 ("ASoC: Intel:
sst-acpi: Request firmware before SST platform driver probing").

Unfortunately same wasn't done in commit 6dda27cb ("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: NMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 20df8d03
...@@ -139,6 +139,7 @@ static int sst_acpi_probe(struct platform_device *pdev) ...@@ -139,6 +139,7 @@ static int sst_acpi_probe(struct platform_device *pdev)
sst_pdata = &sst_acpi->sst_pdata; sst_pdata = &sst_acpi->sst_pdata;
sst_pdata->id = desc->sst_id; sst_pdata->id = desc->sst_id;
sst_acpi->desc = desc; sst_acpi->desc = desc;
sst_acpi->mach = mach;
if (desc->resindex_dma_base >= 0) { if (desc->resindex_dma_base >= 0) {
sst_pdata->dma_engine = desc->dma_engine; sst_pdata->dma_engine = desc->dma_engine;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册