|
@@ -1577,7 +1577,8 @@ static struct net_device *ipoib_add_port(const char *format,
|
|
SET_NETDEV_DEV(priv->dev, hca->dma_device);
|
|
SET_NETDEV_DEV(priv->dev, hca->dma_device);
|
|
priv->dev->dev_id = port - 1;
|
|
priv->dev->dev_id = port - 1;
|
|
|
|
|
|
- if (!ib_query_port(hca, port, &attr))
|
|
|
|
|
|
+ result = ib_query_port(hca, port, &attr);
|
|
|
|
+ if (!result)
|
|
priv->max_ib_mtu = ib_mtu_enum_to_int(attr.max_mtu);
|
|
priv->max_ib_mtu = ib_mtu_enum_to_int(attr.max_mtu);
|
|
else {
|
|
else {
|
|
printk(KERN_WARNING "%s: ib_query_port %d failed\n",
|
|
printk(KERN_WARNING "%s: ib_query_port %d failed\n",
|
|
@@ -1598,7 +1599,8 @@ static struct net_device *ipoib_add_port(const char *format,
|
|
goto device_init_failed;
|
|
goto device_init_failed;
|
|
}
|
|
}
|
|
|
|
|
|
- if (ipoib_set_dev_features(priv, hca))
|
|
|
|
|
|
+ result = ipoib_set_dev_features(priv, hca);
|
|
|
|
+ if (result)
|
|
goto device_init_failed;
|
|
goto device_init_failed;
|
|
|
|
|
|
/*
|
|
/*
|