提交 267ee88e 编写于 作者: R Roland Dreier

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: NRoland Dreier <rolandd@cisco.com>
上级 4f71055a
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册