Commit 9f3199bc authored by Wei Yongjun's avatar Wei Yongjun Committed by Richard Weinberger
Browse files

um: vector: fix missing unlock on error in vector_net_open()



Add the missing unlock before return from function vector_net_open()
in the error handling case.

Fixes: ad1f62ab2bd4 ("High Performance UML Vector Network Driver")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent f1668501
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1156,8 +1156,10 @@ static int vector_net_open(struct net_device *dev)
	struct vector_device *vdevice;

	spin_lock_irqsave(&vp->lock, flags);
	if (vp->opened)
	if (vp->opened) {
		spin_unlock_irqrestore(&vp->lock, flags);
		return -ENXIO;
	}
	vp->opened = true;
	spin_unlock_irqrestore(&vp->lock, flags);