diff mbox

[1/2] ASoC: Ux500: Fixup complile errors due to merge

Message ID 1350653427-28611-1-git-send-email-ulf.hansson@stericsson.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ulf Hansson Oct. 19, 2012, 1:30 p.m. UTC
From: Ulf Hansson <ulf.hansson@linaro.org>

Likely during merge of the below commits ended up breaking compilation:
ASoC: Ux500: Enable ux500 MSP driver for Device Tree
ASoC: ux500_msp_i2s: better use devm functions and fix error return code

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 sound/soc/ux500/ux500_msp_i2s.c |   18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

Comments

Lee Jones Oct. 22, 2012, 8:30 a.m. UTC | #1
On Fri, 19 Oct 2012, Ulf Hansson wrote:

> From: Ulf Hansson <ulf.hansson@linaro.org>
> 
> Likely during merge of the below commits ended up breaking compilation:
> ASoC: Ux500: Enable ux500 MSP driver for Device Tree
> ASoC: ux500_msp_i2s: better use devm functions and fix error return code

This is already fixed:
  https://patchwork.kernel.org/patch/1593881/
diff mbox

Patch

diff --git a/sound/soc/ux500/ux500_msp_i2s.c b/sound/soc/ux500/ux500_msp_i2s.c
index b7c996e..e6ff328 100644
--- a/sound/soc/ux500/ux500_msp_i2s.c
+++ b/sound/soc/ux500/ux500_msp_i2s.c
@@ -692,19 +692,15 @@  int ux500_msp_i2s_init_msp(struct platform_device *pdev,
 	if (!msp)
 		return -ENOMEM;
 
-	if (np) {
-		if (!platform_data) {
-			platform_data = devm_kzalloc(&pdev->dev,
-				sizeof(struct msp_i2s_platform_data), GFP_KERNEL);
-			if (!platform_data)
-				ret = -ENOMEM;
-		}
-	} else
+	if (np && !platform_data) {
+		platform_data = devm_kzalloc(&pdev->dev,
+			sizeof(struct msp_i2s_platform_data), GFP_KERNEL);
 		if (!platform_data)
-			ret = -EINVAL;
+			return -ENOMEM;
+	}
 
-	if (ret)
-		goto err_res;
+	if (!platform_data)
+		return -EINVAL;
 
 	dev_dbg(&pdev->dev, "%s: Enter (name: %s, id: %d).\n", __func__,
 		pdev->name, platform_data->id);