提交 31611de7 编写于 作者: C Colin Ian King 提交者: Yang Yingliang

ASoC: Intel: mrfld: return error codes when an error occurs

commit 3025571e upstream.

Currently function sst_platform_get_resources always returns zero and
error return codes set by the function are never returned. Fix this
by returning the error return code in variable ret rather than the
hard coded zero.

Addresses-Coverity: ("Unused value")
Fixes: f533a035 ("ASoC: Intel: mrfld - create separate module for pci part")
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Acked-by: NCezary Rojewski <cezary.rojewski@intel.com>
Acked-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200208220720.36657-1-colin.king@canonical.comSigned-off-by: NMark Brown <broonie@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 5f375d30
...@@ -107,7 +107,7 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx) ...@@ -107,7 +107,7 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx)
dev_dbg(ctx->dev, "DRAM Ptr %p\n", ctx->dram); dev_dbg(ctx->dev, "DRAM Ptr %p\n", ctx->dram);
do_release_regions: do_release_regions:
pci_release_regions(pci); pci_release_regions(pci);
return 0; return ret;
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册