Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bdc455b5 authored by Vinod Koul's avatar Vinod Koul Committed by Mark Brown
Browse files

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}