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

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

[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
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -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: