[alsa-devel] [PATCH] 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
Signed-off-by: Vinod Koul vinod.koul@intel.com Reported-by: Dan Carpenter dan.carpenter@oracle.com --- sound/soc/intel/sst/sst_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/sst/sst_acpi.c b/sound/soc/intel/sst/sst_acpi.c index b782dfdcdbba..b536ddd2517d 100644 --- a/sound/soc/intel/sst/sst_acpi.c +++ b/sound/soc/intel/sst/sst_acpi.c @@ -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; }
On Wed, Mar 18, 2015 at 09:31:38PM +0530, Vinod Koul wrote:
Fix the sst_acpi_probe memory allocation error path by setting right error code and initiating the cleanup insteadof just returning
Applied, thanks.
participants (2)
-
Mark Brown
-
Vinod Koul