projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e79e3e
)
i2c-pxa2xx: return proper error code in ce4100_i2c_probe error paths
author
Axel Lin
<
[email protected]
>
Tue, 30 Aug 2011 06:37:37 +0000
(14:37 +0800)
committer
Ben Dooks
<
[email protected]
>
Tue, 6 Sep 2011 23:09:12 +0000
(
00:09
+0100)
Signed-off-by: Axel Lin <
[email protected]
>
Acked-by: Sebastian Andrzej Siewior <
[email protected]
>
Signed-off-by: Ben Dooks <
[email protected]
>
drivers/i2c/busses/i2c-pxa-pci.c
patch
|
blob
|
history
diff --git
a/drivers/i2c/busses/i2c-pxa-pci.c
b/drivers/i2c/busses/i2c-pxa-pci.c
index 6659d269b841b4c04869ec3aa9d18eb23cb4a4a4..b73da6cd6f915008384d9fd3f20b95ca4d41db8d 100644
(file)
--- a/
drivers/i2c/busses/i2c-pxa-pci.c
+++ b/
drivers/i2c/busses/i2c-pxa-pci.c
@@
-109,12
+109,15
@@
static int __devinit ce4100_i2c_probe(struct pci_dev *dev,
return -EINVAL;
}
sds = kzalloc(sizeof(*sds), GFP_KERNEL);
- if (!sds)
+ if (!sds) {
+ ret = -ENOMEM;
goto err_mem;
+ }
for (i = 0; i < ARRAY_SIZE(sds->pdev); i++) {
sds->pdev[i] = add_i2c_device(dev, i);
if (IS_ERR(sds->pdev[i])) {
+ ret = PTR_ERR(sds->pdev[i]);
while (--i >= 0)
platform_device_unregister(sds->pdev[i]);
goto err_dev_add;