aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/shdma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/shdma.c')
-rw-r--r--drivers/dma/shdma.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c
index b3b065c4e5c1..034ecf0ace03 100644
--- a/drivers/dma/shdma.c
+++ b/drivers/dma/shdma.c
@@ -640,17 +640,16 @@ static int __init sh_dmae_probe(struct platform_device *pdev)
640#endif 640#endif
641 struct sh_dmae_device *shdev; 641 struct sh_dmae_device *shdev;
642 642
643 /* get platform data */
644 if (!pdev->dev.platform_data)
645 return -ENODEV;
646
643 shdev = kzalloc(sizeof(struct sh_dmae_device), GFP_KERNEL); 647 shdev = kzalloc(sizeof(struct sh_dmae_device), GFP_KERNEL);
644 if (!shdev) { 648 if (!shdev) {
645 dev_err(&pdev->dev, "No enough memory\n"); 649 dev_err(&pdev->dev, "No enough memory\n");
646 err = -ENOMEM; 650 return -ENOMEM;
647 goto shdev_err;
648 } 651 }
649 652
650 /* get platform data */
651 if (!pdev->dev.platform_data)
652 goto shdev_err;
653
654 /* platform data */ 653 /* platform data */
655 memcpy(&shdev->pdata, pdev->dev.platform_data, 654 memcpy(&shdev->pdata, pdev->dev.platform_data,
656 sizeof(struct sh_dmae_pdata)); 655 sizeof(struct sh_dmae_pdata));
@@ -722,7 +721,6 @@ eirq_err:
722rst_err: 721rst_err:
723 kfree(shdev); 722 kfree(shdev);
724 723
725shdev_err:
726 return err; 724 return err;
727} 725}
728 726