Skip to content

Commit

Permalink
ASoC: fsl: fsl_ssi: Fix the order of resources removal
Browse files Browse the repository at this point in the history
In fsl_ssi_remove() we need to remove the resources in the opposite order that
they were acquired in probe.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Fabio Estevam authored and Mark Brown committed Aug 20, 2013
1 parent 3c1c32d commit 0783e64
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sound/soc/fsl/fsl_ssi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
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);
dev_set_drvdata(&pdev->dev, NULL);

return 0;
}
Expand Down

0 comments on commit 0783e64

Please sign in to comment.