Commit bdc455b5 authored by Vinod Koul's avatar Vinod Koul Committed by 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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment