aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2005-11-29 13:55:58 -0500
committerRoland Dreier <rolandd@cisco.com>2005-11-29 13:55:58 -0500
commit267ee88ed34c76dc527eeb3d95f9f9558ac99973 (patch)
tree1f53cd0db55372192cc088788dadbed102845a17 /drivers/infiniband
parent4f71055a45a503273c039d80db8ba9b13cb17549 (diff)
IPoIB: fix error handling in ipoib_open
If ipoib_ib_dev_up() fails after ipoib_ib_dev_open() is called, then ipoib_ib_dev_stop() needs to be called to clean up. Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 826d7a73ef84..475d98fa9e26 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -94,8 +94,10 @@ int ipoib_open(struct net_device *dev)
94 if (ipoib_ib_dev_open(dev)) 94 if (ipoib_ib_dev_open(dev))
95 return -EINVAL; 95 return -EINVAL;
96 96
97 if (ipoib_ib_dev_up(dev)) 97 if (ipoib_ib_dev_up(dev)) {
98 ipoib_ib_dev_stop(dev);
98 return -EINVAL; 99 return -EINVAL;
100 }
99 101
100 if (!test_bit(IPOIB_FLAG_SUBINTERFACE, &priv->flags)) { 102 if (!test_bit(IPOIB_FLAG_SUBINTERFACE, &priv->flags)) {
101 struct ipoib_dev_priv *cpriv; 103 struct ipoib_dev_priv *cpriv;