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

[SCSI] megaraid_sas: release lock on error path

We should unlock here before returning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>

authored by

Dan Carpenter and committed by
James Bottomley
c64e483e 88346787

+2 -1
+2 -1
drivers/scsi/megaraid/megaraid_sas_base.c
··· 4931 4931 printk(KERN_ERR "megaraid_sas: timed out while" 4932 4932 "waiting for HBA to recover\n"); 4933 4933 error = -ENODEV; 4934 - goto out_kfree_ioc; 4934 + goto out_up; 4935 4935 } 4936 4936 spin_unlock_irqrestore(&instance->hba_lock, flags); 4937 4937 4938 4938 error = megasas_mgmt_fw_ioctl(instance, user_ioc, ioc); 4939 + out_up: 4939 4940 up(&instance->ioctl_sem); 4940 4941 4941 4942 out_kfree_ioc: