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>

+3 -1
+3 -1
drivers/infiniband/ulp/ipoib/ipoib_main.c
··· 94 94 if (ipoib_ib_dev_open(dev)) 95 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 99 return -EINVAL; 100 + } 99 101 100 102 if (!test_bit(IPOIB_FLAG_SUBINTERFACE, &priv->flags)) { 101 103 struct ipoib_dev_priv *cpriv;