From: Vinod Koul Date: Wed, 18 Mar 2015 16:01:38 +0000 (+0530) Subject: ASoC: Intel: acpi_probe: fix error return path X-Git-Tag: firefly_0821_release~176^2~1862^2~14^2~17^2~1 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=bdc455b512c880292d7f145e73aed5e37a90f6e4;p=firefly-linux-kernel-4.4.55.git 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: Dan Carpenter Signed-off-by: Vinod Koul Signed-off-by: Mark Brown --- diff --git a/sound/soc/intel/sst/sst_acpi.c b/sound/soc/intel/sst/sst_acpi.c index b3360139c41a..98c2444dece3 100644 --- a/sound/soc/intel/sst/sst_acpi.c +++ b/sound/soc/intel/sst/sst_acpi.c @@ -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; }