* [patch -next] lpfc: unlock etc on error path
@ 2010-10-14 16:38 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2010-10-14 16:38 UTC (permalink / raw)
To: James Smart
Cc: James E.J. Bottomley, Alex Iannicelli, linux-scsi, linux-kernel,
kernel-janitors
All the other error paths call sysfs_mbox_idle() and unlock before
returning.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index f681eea..5f7d9e6 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -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:
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [patch -next] lpfc: unlock etc on error path
@ 2010-10-14 16:38 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2010-10-14 16:38 UTC (permalink / raw)
To: James Smart
Cc: James E.J. Bottomley, Alex Iannicelli, linux-scsi, linux-kernel,
kernel-janitors
All the other error paths call sysfs_mbox_idle() and unlock before
returning.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index f681eea..5f7d9e6 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -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:
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-14 16:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-14 16:38 [patch -next] lpfc: unlock etc on error path Dan Carpenter
2010-10-14 16:38 ` Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.