diff mbox

ASoC: Intel: acpi_probe: fix error return path

Message ID 1426694498-10811-1-git-send-email-vinod.koul@intel.com (mailing list archive)
State Accepted
Commit bdc455b512c880292d7f145e73aed5e37a90f6e4
Headers show

Commit Message

Vinod Koul March 18, 2015, 4:01 p.m. UTC
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(-)

Comments

Mark Brown March 19, 2015, 12:57 a.m. UTC | #1
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.
diff mbox

Patch

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;
 	}