summaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-09-20 15:09:00 +0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-09-20 12:58:59 +0100
commitd890a1a42dff2e6987f04f18fc9e467b10e99cc9 (patch)
treeabbbfd6b6e71df9970e774c41adf0cf9cf9928ac /sound/soc/fsl
parentded71dcb77ae0dee71fdb9c4e2d2b3dc3d1b7693 (diff)
downloadblackbird-op-linux-d890a1a42dff2e6987f04f18fc9e467b10e99cc9.tar.gz
blackbird-op-linux-d890a1a42dff2e6987f04f18fc9e467b10e99cc9.zip
ASoC: fsl: Fix error handling if platform_device_add fails
Call platform_device_put() instead of platform_device_unregister() if platform_device_add() fails. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/fsl')
-rw-r--r--sound/soc/fsl/mpc8610_hpcd.c2
-rw-r--r--sound/soc/fsl/p1022_ds.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c
index 358f0baaf71b..31af405bda84 100644
--- a/sound/soc/fsl/mpc8610_hpcd.c
+++ b/sound/soc/fsl/mpc8610_hpcd.c
@@ -505,7 +505,7 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev)
return 0;
error_sound:
- platform_device_unregister(sound_device);
+ platform_device_put(sound_device);
error:
kfree(machine_data);
error_alloc:
diff --git a/sound/soc/fsl/p1022_ds.c b/sound/soc/fsl/p1022_ds.c
index e8849ed36cbd..2c064a9824ad 100644
--- a/sound/soc/fsl/p1022_ds.c
+++ b/sound/soc/fsl/p1022_ds.c
@@ -506,7 +506,7 @@ static int p1022_ds_probe(struct platform_device *pdev)
error:
if (sound_device)
- platform_device_unregister(sound_device);
+ platform_device_put(sound_device);
kfree(mdata);
error_put:
OpenPOWER on IntegriCloud