Commit c64e483e authored by Dan Carpenter's avatar Dan Carpenter Committed by James Bottomley

[SCSI] megaraid_sas: release lock on error path

We should unlock here before returning.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarAdam Radford <aradford@gmail.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 88346787
...@@ -4931,11 +4931,12 @@ static int megasas_mgmt_ioctl_fw(struct file *file, unsigned long arg) ...@@ -4931,11 +4931,12 @@ static int megasas_mgmt_ioctl_fw(struct file *file, unsigned long arg)
printk(KERN_ERR "megaraid_sas: timed out while" printk(KERN_ERR "megaraid_sas: timed out while"
"waiting for HBA to recover\n"); "waiting for HBA to recover\n");
error = -ENODEV; error = -ENODEV;
goto out_kfree_ioc; goto out_up;
} }
spin_unlock_irqrestore(&instance->hba_lock, flags); spin_unlock_irqrestore(&instance->hba_lock, flags);
error = megasas_mgmt_fw_ioctl(instance, user_ioc, ioc); error = megasas_mgmt_fw_ioctl(instance, user_ioc, ioc);
out_up:
up(&instance->ioctl_sem); up(&instance->ioctl_sem);
out_kfree_ioc: out_kfree_ioc:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment