提交 bdc455b5 编写于 作者: V Vinod Koul 提交者: Mark Brown

ASoC: Intel: acpi_probe: fix error return path

Fix the sst_acpi_probe memory allocation error path by setting right error
code and initiating the cleanup insteadof just returning
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NVinod Koul <vinod.koul@intel.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 3fe0607a
......@@ -309,7 +309,7 @@ int sst_acpi_probe(struct platform_device *pdev)
ctx->shim_regs64 = devm_kzalloc(ctx->dev, sizeof(*ctx->shim_regs64),
GFP_KERNEL);
if (!ctx->shim_regs64) {
return -ENOMEM;
ret = -ENOMEM;
goto do_sst_cleanup;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册