* [PATCH -next] vme: fake: remove unexpected unlock in fake_master_set()
@ 2016-09-17 1:57 Wei Yongjun
0 siblings, 0 replies; only message in thread
From: Wei Yongjun @ 2016-09-17 1:57 UTC (permalink / raw)
To: Martyn Welch, Manohar Vanga, Greg Kroah-Hartman, Arnd Bergmann
Cc: Wei Yongjun, devel, linux-kernel
From: Wei Yongjun <weiyongjun1@huawei.com>
image->lock is unlocked in some error handling path without take the
lock, so remove those unexpected unlock.
Fixes: 658bcdae9c67 ("vme: Adding Fake VME driver")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/vme/bridges/vme_fake.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/vme/bridges/vme_fake.c b/drivers/vme/bridges/vme_fake.c
index ebf35d3..4b2613d 100644
--- a/drivers/vme/bridges/vme_fake.c
+++ b/drivers/vme/bridges/vme_fake.c
@@ -273,7 +273,6 @@ static int fake_master_set(struct vme_master_resource *image, int enabled,
}
if (size & 0xFFFF) {
- spin_unlock(&image->lock);
pr_err("Invalid size alignment\n");
retval = -EINVAL;
goto err_window;
@@ -292,7 +291,6 @@ static int fake_master_set(struct vme_master_resource *image, int enabled,
case VME_D32:
break;
default:
- spin_unlock(&image->lock);
pr_err("Invalid data width\n");
retval = -EINVAL;
goto err_dwidth;
@@ -311,7 +309,6 @@ static int fake_master_set(struct vme_master_resource *image, int enabled,
case VME_USER4:
break;
default:
- spin_unlock(&image->lock);
pr_err("Invalid address space\n");
retval = -EINVAL;
goto err_aspace;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-09-17 1:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-17 1:57 [PATCH -next] vme: fake: remove unexpected unlock in fake_master_set() Wei Yongjun
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.