Skip to contentSkip to conversation

megaraid: unlock on error path

PATCH New Dan Carpenter 1 participant 1 message Oct 14, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 megaraid: unlock on error path

We need to release the semaphore here before returning.

This was introduced in 39a985547cb: "[SCSI] megaraid_sas: Add Online Controller Reset to MegaRAID SAS drive"

drivers/scsi/megaraid/megaraid_sas.c +3 -1
index 55951f4..ab28bae 100644
@@ -4436,11 +4436,13 @@ 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: