Commit fdfa82ee authored by Vinod Koul's avatar Vinod Koul Committed by Mark Brown

ASoC: Intel: Skylake: Don't use local pointer for firmware

We have firmware pointer is driver context, so use that instead
of local pointer.
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 6eee8726
...@@ -132,20 +132,19 @@ static int sst_transfer_fw_host_dma(struct sst_dsp *ctx) ...@@ -132,20 +132,19 @@ static int sst_transfer_fw_host_dma(struct sst_dsp *ctx)
static int bxt_load_base_firmware(struct sst_dsp *ctx) static int bxt_load_base_firmware(struct sst_dsp *ctx)
{ {
const struct firmware *fw = NULL;
struct skl_sst *skl = ctx->thread_context; struct skl_sst *skl = ctx->thread_context;
int ret; int ret;
ret = request_firmware(&fw, ctx->fw_name, ctx->dev); ret = request_firmware(&ctx->fw, ctx->fw_name, ctx->dev);
if (ret < 0) { if (ret < 0) {
dev_err(ctx->dev, "Request firmware failed %d\n", ret); dev_err(ctx->dev, "Request firmware failed %d\n", ret);
goto sst_load_base_firmware_failed; goto sst_load_base_firmware_failed;
} }
ret = sst_bxt_prepare_fw(ctx, fw->data, fw->size); ret = sst_bxt_prepare_fw(ctx, ctx->fw->data, ctx->fw->size);
/* Retry Enabling core and ROM load. Retry seemed to help */ /* Retry Enabling core and ROM load. Retry seemed to help */
if (ret < 0) { if (ret < 0) {
ret = sst_bxt_prepare_fw(ctx, fw->data, fw->size); ret = sst_bxt_prepare_fw(ctx, ctx->fw->data, ctx->fw->size);
if (ret < 0) { if (ret < 0) {
dev_err(ctx->dev, "Core En/ROM load fail:%d\n", ret); dev_err(ctx->dev, "Core En/ROM load fail:%d\n", ret);
goto sst_load_base_firmware_failed; goto sst_load_base_firmware_failed;
...@@ -175,7 +174,7 @@ static int bxt_load_base_firmware(struct sst_dsp *ctx) ...@@ -175,7 +174,7 @@ static int bxt_load_base_firmware(struct sst_dsp *ctx)
} }
sst_load_base_firmware_failed: sst_load_base_firmware_failed:
release_firmware(fw); release_firmware(ctx->fw);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment