]> Git Repo - linux.git/commitdiff
ASoC: Intel: acpi_probe: fix error return path
authorVinod Koul <[email protected]>
Wed, 18 Mar 2015 16:01:38 +0000 (21:31 +0530)
committerMark Brown <[email protected]>
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 <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
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;
        }
 
This page took 0.059815 seconds and 4 git commands to generate.