diff mbox series

[4/7] qla2xxx: Make qla2x00_sysfs_write_nvram() easier to analyze

Message ID 20181018224546.189268-5-bvanassche@acm.org (mailing list archive)
State Accepted
Headers show
Series qla2xxx patches for kernel v4.20 | expand

Commit Message

Bart Van Assche Oct. 18, 2018, 10:45 p.m. UTC
Modify the unlock statement such that it becomes easier for static
analyzers to analyze it. This patch does not change any functionality.

Cc: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/qla2xxx/qla_attr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Madhani, Himanshu Oct. 30, 2018, 4:55 a.m. UTC | #1
> On Oct 18, 2018, at 3:45 PM, Bart Van Assche <bvanassche@acm.org> wrote:
> 
> External Email
> 
> Modify the unlock statement such that it becomes easier for static
> analyzers to analyze it. This patch does not change any functionality.
> 
> Cc: Himanshu Madhani <himanshu.madhani@cavium.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
> drivers/scsi/qla2xxx/qla_attr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
> index b28f159fdaee..0bb9ac6ece92 100644
> --- a/drivers/scsi/qla2xxx/qla_attr.c
> +++ b/drivers/scsi/qla2xxx/qla_attr.c
> @@ -218,7 +218,7 @@ qla2x00_sysfs_write_nvram(struct file *filp, struct kobject *kobj,
> 
>        mutex_lock(&ha->optrom_mutex);
>        if (qla2x00_chip_is_down(vha)) {
> -               mutex_unlock(&vha->hw->optrom_mutex);
> +               mutex_unlock(&ha->optrom_mutex);
>                return -EAGAIN;
>        }
> 
> --
> 2.19.1.568.g152ad8e336-goog
> 

Looks good. 

Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com> 

Thanks,
- Himanshu
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index b28f159fdaee..0bb9ac6ece92 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -218,7 +218,7 @@  qla2x00_sysfs_write_nvram(struct file *filp, struct kobject *kobj,
 
 	mutex_lock(&ha->optrom_mutex);
 	if (qla2x00_chip_is_down(vha)) {
-		mutex_unlock(&vha->hw->optrom_mutex);
+		mutex_unlock(&ha->optrom_mutex);
 		return -EAGAIN;
 	}