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

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
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment