summaryrefslogtreecommitdiff
path: root/drivers/dma/shdma.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-12-22 17:21:47 -0700
committerDan Williams <dan.j.williams@intel.com>2009-12-22 17:21:47 -0700
commitf80ca163d65903276bec7045a484a79c0897eb2d (patch)
tree97c7d61d43248b9db0757a76af80ff58b98b5599 /drivers/dma/shdma.c
parent0794ec8ce327ec74416b569b8fb1951274693700 (diff)
parenta6d52d70677e99bdb89b6921c265d0a58c22e597 (diff)
downloadlinux-3.10-f80ca163d65903276bec7045a484a79c0897eb2d.tar.gz
linux-3.10-f80ca163d65903276bec7045a484a79c0897eb2d.tar.bz2
linux-3.10-f80ca163d65903276bec7045a484a79c0897eb2d.zip
Merge branch 'ioat' into fixes
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 9546f5f356e..d10cc899c46 100644
--- a/drivers/dma/shdma.c
+++ b/drivers/dma/shdma.c
@@ -730,17 +730,16 @@ static int __init sh_dmae_probe(struct platform_device *pdev)
#endif
struct sh_dmae_device *shdev;
+ /* get platform data */
+ if (!pdev->dev.platform_data)
+ return -ENODEV;
+
shdev = kzalloc(sizeof(struct sh_dmae_device), GFP_KERNEL);
if (!shdev) {
dev_err(&pdev->dev, "No enough memory\n");
- err = -ENOMEM;
- goto shdev_err;
+ return -ENOMEM;
}
- /* get platform data */
- if (!pdev->dev.platform_data)
- goto shdev_err;
-
/* platform data */
memcpy(&shdev->pdata, pdev->dev.platform_data,
sizeof(struct sh_dmae_pdata));
@@ -814,7 +813,6 @@ eirq_err:
rst_err:
kfree(shdev);
-shdev_err:
return err;
}