diff options
author | Roland Dreier <rolandd@cisco.com> | 2005-11-29 10:55:58 -0800 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2005-11-29 10:55:58 -0800 |
commit | 267ee88ed34c76dc527eeb3d95f9f9558ac99973 (patch) | |
tree | 1f53cd0db55372192cc088788dadbed102845a17 /drivers | |
parent | 4f71055a45a503273c039d80db8ba9b13cb17549 (diff) | |
download | op-kernel-dev-267ee88ed34c76dc527eeb3d95f9f9558ac99973.zip op-kernel-dev-267ee88ed34c76dc527eeb3d95f9f9558ac99973.tar.gz |
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')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 4 |
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 826d7a7..475d98f 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) if (ipoib_ib_dev_open(dev)) return -EINVAL; - if (ipoib_ib_dev_up(dev)) + if (ipoib_ib_dev_up(dev)) { + ipoib_ib_dev_stop(dev); return -EINVAL; + } if (!test_bit(IPOIB_FLAG_SUBINTERFACE, &priv->flags)) { struct ipoib_dev_priv *cpriv; |