summaryrefslogtreecommitdiffstats
path: root/arch/um/drivers
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2018-01-05 02:22:52 -0500
committerRichard Weinberger <richard@nod.at>2018-02-19 13:38:51 -0500
commit9f3199bcef11caff5e935d0565de0bdb73a3798e (patch)
treeeed27026ac8ab356641540557d5970826827022d /arch/um/drivers
parentf16685014e50d016629dc7af79c4d4fbbd3d9d55 (diff)
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: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/drivers')
-rw-r--r--arch/um/drivers/vector_kern.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c
index d1d53015d572..bb83a2d22ac2 100644
--- a/arch/um/drivers/vector_kern.c
+++ b/arch/um/drivers/vector_kern.c
@@ -1156,8 +1156,10 @@ static int vector_net_open(struct net_device *dev)
1156 struct vector_device *vdevice; 1156 struct vector_device *vdevice;
1157 1157
1158 spin_lock_irqsave(&vp->lock, flags); 1158 spin_lock_irqsave(&vp->lock, flags);
1159 if (vp->opened) 1159 if (vp->opened) {
1160 spin_unlock_irqrestore(&vp->lock, flags);
1160 return -ENXIO; 1161 return -ENXIO;
1162 }
1161 vp->opened = true; 1163 vp->opened = true;
1162 spin_unlock_irqrestore(&vp->lock, flags); 1164 spin_unlock_irqrestore(&vp->lock, flags);
1163 1165