aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/samsung/ac97.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/samsung/ac97.c')
-rw-r--r--sound/soc/samsung/ac97.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c
index 76b072bd4ba2..68d9303047e8 100644
--- a/sound/soc/samsung/ac97.c
+++ b/sound/soc/samsung/ac97.c
@@ -433,7 +433,7 @@ static int s3c_ac97_probe(struct platform_device *pdev)
433 goto err4; 433 goto err4;
434 } 434 }
435 435
436 ret = snd_soc_register_component(&pdev->dev, &s3c_ac97_component, 436 ret = devm_snd_soc_register_component(&pdev->dev, &s3c_ac97_component,
437 s3c_ac97_dai, ARRAY_SIZE(s3c_ac97_dai)); 437 s3c_ac97_dai, ARRAY_SIZE(s3c_ac97_dai));
438 if (ret) 438 if (ret)
439 goto err5; 439 goto err5;
@@ -441,12 +441,10 @@ static int s3c_ac97_probe(struct platform_device *pdev)
441 ret = samsung_asoc_dma_platform_register(&pdev->dev); 441 ret = samsung_asoc_dma_platform_register(&pdev->dev);
442 if (ret) { 442 if (ret) {
443 dev_err(&pdev->dev, "failed to get register DMA: %d\n", ret); 443 dev_err(&pdev->dev, "failed to get register DMA: %d\n", ret);
444 goto err6; 444 goto err5;
445 } 445 }
446 446
447 return 0; 447 return 0;
448err6:
449 snd_soc_unregister_component(&pdev->dev);
450err5: 448err5:
451 free_irq(irq_res->start, NULL); 449 free_irq(irq_res->start, NULL);
452err4: 450err4:
@@ -461,9 +459,6 @@ static int s3c_ac97_remove(struct platform_device *pdev)
461{ 459{
462 struct resource *irq_res; 460 struct resource *irq_res;
463 461
464 samsung_asoc_dma_platform_unregister(&pdev->dev);
465 snd_soc_unregister_component(&pdev->dev);
466
467 irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); 462 irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
468 if (irq_res) 463 if (irq_res)
469 free_irq(irq_res->start, NULL); 464 free_irq(irq_res->start, NULL);