]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ASoC: Intel: acpi_probe: fix error return path
authorVinod Koul <vinod.koul@intel.com>
Wed, 18 Mar 2015 16:01:38 +0000 (21:31 +0530)
committerMark Brown <broonie@kernel.org>
Thu, 19 Mar 2015 00:57:10 +0000 (00:57 +0000)
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 <dan.carpenter@oracle.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/sst/sst_acpi.c

index b3360139c41a905ba9575574d42b7477dd0cbc26..98c2444dece33f35977ac8c659d4ac36616fb42a 100644 (file)
@@ -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;
        }