diff options
author | Axel Lin <axel.lin@gmail.com> | 2010-11-25 02:07:25 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-11-25 06:08:13 -0500 |
commit | 4e1f86509732ccc39938974db0612d14afbca953 (patch) | |
tree | 6d1b50b9441d14781b798543adc9f9443218da09 /sound/soc/fsl | |
parent | 3b6bc354cb22b1069f88acdc7673d3476fbadfca (diff) |
ASoC: efika-audio-fabric: fix resource leak in efika_fabric_init error path
Add missing platform_device_put() if platform_device_add() failed.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/fsl')
-rw-r--r-- | sound/soc/fsl/efika-audio-fabric.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/fsl/efika-audio-fabric.c b/sound/soc/fsl/efika-audio-fabric.c index 53251e6b5bd5..108b5d8bd0e9 100644 --- a/sound/soc/fsl/efika-audio-fabric.c +++ b/sound/soc/fsl/efika-audio-fabric.c | |||
@@ -76,6 +76,7 @@ static __init int efika_fabric_init(void) | |||
76 | rc = platform_device_add(pdev); | 76 | rc = platform_device_add(pdev); |
77 | if (rc) { | 77 | if (rc) { |
78 | pr_err("efika_fabric_init: platform_device_add() failed\n"); | 78 | pr_err("efika_fabric_init: platform_device_add() failed\n"); |
79 | platform_device_put(pdev); | ||
79 | return -ENODEV; | 80 | return -ENODEV; |
80 | } | 81 | } |
81 | return 0; | 82 | return 0; |