提交 9f3199bc 编写于 作者: W Wei Yongjun 提交者: 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: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NRichard Weinberger <richard@nod.at>
上级 f1668501
...@@ -1156,8 +1156,10 @@ static int vector_net_open(struct net_device *dev) ...@@ -1156,8 +1156,10 @@ static int vector_net_open(struct net_device *dev)
struct vector_device *vdevice; struct vector_device *vdevice;
spin_lock_irqsave(&vp->lock, flags); spin_lock_irqsave(&vp->lock, flags);
if (vp->opened) if (vp->opened) {
spin_unlock_irqrestore(&vp->lock, flags);
return -ENXIO; return -ENXIO;
}
vp->opened = true; vp->opened = true;
spin_unlock_irqrestore(&vp->lock, flags); spin_unlock_irqrestore(&vp->lock, flags);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册