Skip to contentSkip to conversation

i2c-pxa2xx: return proper error code in ce4100_i2c_probe error paths

PATCH RESEND In review Axel Lin 2 participants 2 messages Aug 30, 2011 – Sep 6, 2011 I2C subsystem host drivers

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH RESEND 1/1 i2c-pxa2xx: return proper error code in ce4100_i2c_probe error paths

---
Hi Ben,
Seems this patch is not yet upstream. Here is the resend.

Axel

 drivers/i2c/busses/i2c-pxa-pci.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
drivers/i2c/busses/i2c-pxa-pci.c +4 -1
index 6659d26..b73da6c 100644
@@ -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;
Signature · 1 line
1.7.4.1
#1 lore raw
Quoted 2 lines · Axel Lin

A message in the patch description body is always useful.

Will apply.

Quoted 39 lines

---
Hi Ben,
Seems this patch is not yet upstream. Here is the resend.

Axel

 drivers/i2c/busses/i2c-pxa-pci.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
drivers/i2c/busses/i2c-pxa-pci.c +4 -1
index 6659d26..b73da6c 100644
@@ -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;
Signature · 8 lines
1.7.4.1



--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html