Patchwork [17/20] ibmveth: Return -EINVAL on all ->probe errors.

login
register
mail settings
Submitter Anton Blanchard
Date Aug. 23, 2010, 12:09 a.m.
Message ID <20100823001239.897783243@samba.org>
Download mbox | patch
Permalink /patch/62415/
State Awaiting Upstream
Delegated to: David Miller
Headers show

Comments

Anton Blanchard - Aug. 23, 2010, 12:09 a.m.
We had a few cases where we returned success on error.

Signed-off-by: Anton Blanchard <anton@samba.org>
---



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

Index: net-next-2.6/drivers/net/ibmveth.c
===================================================================
--- net-next-2.6.orig/drivers/net/ibmveth.c	2010-08-23 09:23:11.982966815 +1000
+++ net-next-2.6/drivers/net/ibmveth.c	2010-08-23 09:23:32.781489458 +1000
@@ -1358,7 +1358,7 @@  static int __devinit ibmveth_probe(struc
 						VETH_MAC_ADDR, NULL);
 	if (!mac_addr_p) {
 		dev_err(&dev->dev, "Can't find VETH_MAC_ADDR attribute\n");
-		return 0;
+		return -EINVAL;
 	}
 
 	mcastFilterSize_p = (unsigned int *)vio_get_attribute(dev,
@@ -1366,7 +1366,7 @@  static int __devinit ibmveth_probe(struc
 	if (!mcastFilterSize_p) {
 		dev_err(&dev->dev, "Can't find VETH_MCAST_FILTER_SIZE "
 			"attribute\n");
-		return 0;
+		return -EINVAL;
 	}
 
 	netdev = alloc_etherdev(sizeof(struct ibmveth_adapter));