ibmveth: Return -EINVAL on all ->probe errors

We had a few cases where we returned success on error.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Santiago Leon <santil@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Santiago Leon 2010-09-03 18:29:36 +00:00 committed by David S. Miller
parent f148f61d89
commit be35ae9e08

View File

@ -1392,7 +1392,7 @@ static int __devinit ibmveth_probe(struct vio_dev *dev,
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,
@ -1400,7 +1400,7 @@ static int __devinit ibmveth_probe(struct vio_dev *dev,
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));