Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 267ee88e authored by Roland Dreier's avatar Roland Dreier
Browse files

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: default avatarRoland Dreier <rolandd@cisco.com>
parent 4f71055a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;