Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 658bcdae9c67 ("vme: Adding Fake VME driver")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Wei Yongjun and committed by
Greg Kroah-Hartman
db08948b 58ccaae3

-3
-3
drivers/vme/bridges/vme_fake.c
··· 273 273 } 274 274 275 275 if (size & 0xFFFF) { 276 - spin_unlock(&image->lock); 277 276 pr_err("Invalid size alignment\n"); 278 277 retval = -EINVAL; 279 278 goto err_window; ··· 291 292 case VME_D32: 292 293 break; 293 294 default: 294 - spin_unlock(&image->lock); 295 295 pr_err("Invalid data width\n"); 296 296 retval = -EINVAL; 297 297 goto err_dwidth; ··· 309 311 case VME_USER4: 310 312 break; 311 313 default: 312 - spin_unlock(&image->lock); 313 314 pr_err("Invalid address space\n"); 314 315 retval = -EINVAL; 315 316 goto err_aspace;