Skip to contentSkip to conversation

lpfc: unlock etc 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 lpfc: unlock etc on error path

All the other error paths call sysfs_mbox_idle() and unlock before returning.

drivers/scsi/lpfc/lpfc_attr.c +4 -1
index f681eea..5f7d9e6 100644
@@ -3789,8 +3789,11 @@ sysfs_mbox_read(struct file *filp, struct kobject *kobj,
 			break;
 		case MBX_SECURITY_MGMT:
 		case MBX_AUTH_PORT:
-			if (phba->pci_dev_grp = LPFC_PCI_DEV_OC)
+			if (phba->pci_dev_grp = LPFC_PCI_DEV_OC) {
+				sysfs_mbox_idle(phba);
+				spin_unlock_irq(&phba->hbalock);
 				return -EPERM;
+			}
 			break;
 		case MBX_READ_SPARM64:
 		case MBX_READ_LA: