diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-09 01:14:38 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-09 01:14:38 -0500 |
commit | bcd6acd51f3d4d1ada201e9bc5c40a31d6d80c71 (patch) | |
tree | 2f6dffd2d3e4dd67355a224de7e7a960335a92fd /drivers/dma/shdma.c | |
parent | 11c34c7deaeeebcee342cbc35e1bb2a6711b2431 (diff) | |
parent | 3ff6a468b45b5dfeb0e903e56f4eb27d34b2437c (diff) |
Merge commit 'origin/master' into next
Conflicts:
include/linux/kvm.h
Diffstat (limited to 'drivers/dma/shdma.c')
-rw-r--r-- | drivers/dma/shdma.c | 12 |
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: | |||
722 | rst_err: | 721 | rst_err: |
723 | kfree(shdev); | 722 | kfree(shdev); |
724 | 723 | ||
725 | shdev_err: | ||
726 | return err; | 724 | return err; |
727 | } | 725 | } |
728 | 726 | ||