* [patch -next] lpfc: unlock etc on error path
@ 2010-10-14 16:38 Dan Carpenter
0 siblings, 0 replies; only message 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] only message in thread
only message in thread, other threads:[~2010-10-14 16:38 UTC | newest]
Thread overview: (only message) (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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).