Skip to content

Commit

Permalink
ASoC: fsl_spdif: Remove unnecessary dev_set_drvdata()
Browse files Browse the repository at this point in the history
Driver core clears the driver data to NULL after device_release or on probe
failure, so just remove it from here.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Fabio Estevam authored and Mark Brown committed Aug 26, 2013
1 parent f037708 commit 5af407c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions sound/soc/fsl/fsl_spdif.c
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ static int fsl_spdif_probe(struct platform_device *pdev)
&spdif_priv->cpu_dai_drv, 1);
if (ret) {
dev_err(&pdev->dev, "failed to register DAI: %d\n", ret);
goto error_dev;
return ret;
}

ret = imx_pcm_dma_init(pdev);
Expand All @@ -1197,8 +1197,6 @@ static int fsl_spdif_probe(struct platform_device *pdev)

error_component:
snd_soc_unregister_component(&pdev->dev);
error_dev:
dev_set_drvdata(&pdev->dev, NULL);

return ret;
}
Expand All @@ -1207,7 +1205,6 @@ static int fsl_spdif_remove(struct platform_device *pdev)
{
imx_pcm_dma_exit(pdev);
snd_soc_unregister_component(&pdev->dev);
dev_set_drvdata(&pdev->dev, NULL);

return 0;
}
Expand Down

0 comments on commit 5af407c

Please sign in to comment.