From: Dan Carpenter Date: Tue, 16 Apr 2013 07:44:19 +0000 (+0300) Subject: [SCSI] megaraid_sas: release lock on error path X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c64e483ea0a1d7483a5c1ac42ccdf7788eb3ce90;p=linux-beck.git [SCSI] megaraid_sas: release lock on error path We should unlock here before returning. Signed-off-by: Dan Carpenter Acked-by: Adam Radford Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 7c90d57b867e..3a9ddae86f1f 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -4931,11 +4931,12 @@ static int megasas_mgmt_ioctl_fw(struct file *file, unsigned long arg) printk(KERN_ERR "megaraid_sas: timed out while" "waiting for HBA to recover\n"); error = -ENODEV; - goto out_kfree_ioc; + goto out_up; } spin_unlock_irqrestore(&instance->hba_lock, flags); error = megasas_mgmt_fw_ioctl(instance, user_ioc, ioc); + out_up: up(&instance->ioctl_sem); out_kfree_ioc: