Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db08948b authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman
Browse files

vme: fake: remove unexpected unlock in fake_master_set()



image->lock is unlocked in some error handling path without take the
lock, so remove those unexpected unlock.

Fixes: 658bcdae ("vme: Adding Fake VME driver")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 58ccaae3
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -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;