aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/atmel/sam9g20_wm8731.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/atmel/sam9g20_wm8731.c')
-rw-r--r--sound/soc/atmel/sam9g20_wm8731.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/soc/atmel/sam9g20_wm8731.c b/sound/soc/atmel/sam9g20_wm8731.c
index 293569dfd0ed..e521ada80542 100644
--- a/sound/soc/atmel/sam9g20_wm8731.c
+++ b/sound/soc/atmel/sam9g20_wm8731.c
@@ -222,9 +222,9 @@ static int __init at91sam9g20ek_init(void)
222 } 222 }
223 223
224 pllb = clk_get(NULL, "pllb"); 224 pllb = clk_get(NULL, "pllb");
225 if (IS_ERR(mclk)) { 225 if (IS_ERR(pllb)) {
226 printk(KERN_ERR "ASoC: Failed to get PLLB\n"); 226 printk(KERN_ERR "ASoC: Failed to get PLLB\n");
227 ret = PTR_ERR(mclk); 227 ret = PTR_ERR(pllb);
228 goto err_mclk; 228 goto err_mclk;
229 } 229 }
230 ret = clk_set_parent(mclk, pllb); 230 ret = clk_set_parent(mclk, pllb);
@@ -240,6 +240,7 @@ static int __init at91sam9g20ek_init(void)
240 if (!at91sam9g20ek_snd_device) { 240 if (!at91sam9g20ek_snd_device) {
241 printk(KERN_ERR "ASoC: Platform device allocation failed\n"); 241 printk(KERN_ERR "ASoC: Platform device allocation failed\n");
242 ret = -ENOMEM; 242 ret = -ENOMEM;
243 goto err_mclk;
243 } 244 }
244 245
245 platform_set_drvdata(at91sam9g20ek_snd_device, 246 platform_set_drvdata(at91sam9g20ek_snd_device,
@@ -248,11 +249,13 @@ static int __init at91sam9g20ek_init(void)
248 ret = platform_device_add(at91sam9g20ek_snd_device); 249 ret = platform_device_add(at91sam9g20ek_snd_device);
249 if (ret) { 250 if (ret) {
250 printk(KERN_ERR "ASoC: Platform device allocation failed\n"); 251 printk(KERN_ERR "ASoC: Platform device allocation failed\n");
251 platform_device_put(at91sam9g20ek_snd_device); 252 goto err_device_add;
252 } 253 }
253 254
254 return ret; 255 return ret;
255 256
257err_device_add:
258 platform_device_put(at91sam9g20ek_snd_device);
256err_mclk: 259err_mclk:
257 clk_put(mclk); 260 clk_put(mclk);
258 mclk = NULL; 261 mclk = NULL;