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: Wei Yongjun <[email protected]>
Signed-off-by: Richard Weinberger <[email protected]>
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);