Skip to contentSkip to conversation

ASoC: Intel: acpi_probe: fix error return path

PATCH Applied Vinod Koul 2 participants 2 messages Mar 18, 2015 – Mar 19, 2015

Subsystems (3)
lore
Share & tools
lore

Vinod Koul

author
#0 lore raw

PATCH 1/1 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

---
 sound/soc/intel/sst/sst_acpi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/sst/sst_acpi.c +1 -1
index b782dfdcdbba..b536ddd2517d 100644
@@ -309,7 +309,7 @@ static 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;
 	}
 
Signature · 1 line
1.7.9.5
maintainer Applied
#1 lore raw
Quoted 2 lines · Vinod Koul

Fix the sst_acpi_probe memory allocation error path by setting right error code and initiating the cleanup insteadof just returning

Applied, thanks.