Skip to contentSkip to conversation

ASoC: fsl: fsl_ssi: Fix the order of resources removal

PATCH Applied Fabio Estevam 2 participants 2 messages Aug 17, 2013 – Aug 20, 2013

Subsystems (3)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 ASoC: fsl: fsl_ssi: Fix the order of resources removal

From: Fabio Estevam <[email protected]>

In fsl_ssi_remove() we need to remove the resources in the opposite order that they were acquired in probe.

---
 sound/soc/fsl/fsl_ssi.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
sound/soc/fsl/fsl_ssi.c +5 -5
index 0c072ff..c8aee4e 100644
@@ -928,14 +928,14 @@ static int fsl_ssi_remove(struct platform_device *pdev)
 
 	if (!ssi_private->new_binding)
 		platform_device_unregister(ssi_private->pdev);
-	if (ssi_private->ssi_on_imx) {
+	if (ssi_private->ssi_on_imx)
 		imx_pcm_dma_exit(pdev);
-		clk_disable_unprepare(ssi_private->clk);
-	}
 	snd_soc_unregister_component(&pdev->dev);
-	device_remove_file(&pdev->dev, &ssi_private->dev_attr);
-	irq_dispose_mapping(ssi_private->irq);
 	dev_set_drvdata(&pdev->dev, NULL);
+	device_remove_file(&pdev->dev, &ssi_private->dev_attr);
+	if (ssi_private->ssi_on_imx)
+		clk_disable_unprepare(ssi_private->clk);
+	irq_dispose_mapping(ssi_private->irq);
 
 	return 0;
 }
Signature · 1 line
1.8.1.2
maintainer Applied
#1 lore raw
Quoted 4 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

In fsl_ssi_remove() we need to remove the resources in the opposite order that they were acquired in probe.

Applied, thanks.