git.samba.org
/
sfrench
/
cifs-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier...
[sfrench/cifs-2.6.git]
/
drivers
/
dma
/
shdma.c
diff --git
a/drivers/dma/shdma.c
b/drivers/dma/shdma.c
index b3b065c4e5c1f4eb0990c5e81286a8191e81edee..034ecf0ace03751b5fb20b282328e8a4d70005fe 100644
(file)
--- a/
drivers/dma/shdma.c
+++ b/
drivers/dma/shdma.c
@@
-640,17
+640,16
@@
static int __init sh_dmae_probe(struct platform_device *pdev)
#endif
struct sh_dmae_device *shdev;
#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");
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));
/* platform data */
memcpy(&shdev->pdata, pdev->dev.platform_data,
sizeof(struct sh_dmae_pdata));
@@
-722,7
+721,6
@@
eirq_err:
rst_err:
kfree(shdev);
rst_err:
kfree(shdev);
-shdev_err:
return err;
}
return err;
}