* [patch] [SCSI] megaraid_sas: release lock on error path
@ 2013-04-16 7:44 Dan Carpenter
2013-04-16 21:22 ` adam radford
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-04-16 7:44 UTC (permalink / raw)
To: Neela Syam Kolli; +Cc: James E.J. Bottomley, linux-scsi, kernel-janitors
We should unlock here before returning.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 9d53540..eb2385f 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -4931,11 +4931,12 @@ 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:
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [patch] [SCSI] megaraid_sas: release lock on error path
2013-04-16 7:44 [patch] [SCSI] megaraid_sas: release lock on error path Dan Carpenter
@ 2013-04-16 21:22 ` adam radford
0 siblings, 0 replies; 2+ messages in thread
From: adam radford @ 2013-04-16 21:22 UTC (permalink / raw)
To: Dan Carpenter
Cc: Neela Syam Kolli, James E.J. Bottomley, linux-scsi,
kernel-janitors
On Tue, Apr 16, 2013 at 12:44 AM, Dan Carpenter
<dan.carpenter@oracle.com> wrote:
> We should unlock here before returning.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
> index 9d53540..eb2385f 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_base.c
> +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
> @@ -4931,11 +4931,12 @@ 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:
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Thanks Dan, this looks good.
Acked-by: Adam Radford <aradford@gmail.com>
-Adam
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-04-16 21:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-16 7:44 [patch] [SCSI] megaraid_sas: release lock on error path Dan Carpenter
2013-04-16 21:22 ` adam radford
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox