diff mbox

[01/11] hpsa: Correct double unlock of mutex

Message ID 20150718161222.31955.95845.stgit@brunhilda (mailing list archive)
State New, archived
Headers show

Commit Message

Don Brace July 18, 2015, 4:12 p.m. UTC
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Scott Teel <scott.teel@pmcs.com>
Reviewed-by: Kevin Barnett <kevin.barnett@pmcs.com>
Signed-off-by: Don Brace <don.brace@pmcs.com>
---
 drivers/scsi/hpsa.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)


--
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

Comments

Tomas Henzl July 22, 2015, 3:16 p.m. UTC | #1
On 18.7.2015 18:12, Don Brace wrote:
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Reviewed-by: Scott Teel <scott.teel@pmcs.com>
> Reviewed-by: Kevin Barnett <kevin.barnett@pmcs.com>
> Signed-off-by: Don Brace <don.brace@pmcs.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>

Tomas
> ---
>  drivers/scsi/hpsa.c |    9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
> index 1dafeb4..1d5f4fd 100644
> --- a/drivers/scsi/hpsa.c
> +++ b/drivers/scsi/hpsa.c
> @@ -2749,11 +2749,10 @@ static int hpsa_do_reset(struct ctlr_info *h, struct hpsa_scsi_dev_t *dev,
>  			lockup_detected(h));
>  
>  	if (unlikely(lockup_detected(h))) {
> -			dev_warn(&h->pdev->dev,
> -				 "Controller lockup detected during reset wait\n");
> -			mutex_unlock(&h->reset_mutex);
> -			rc = -ENODEV;
> -		}
> +		dev_warn(&h->pdev->dev,
> +			 "Controller lockup detected during reset wait\n");
> +		rc = -ENODEV;
> +	}
>  
>  	if (unlikely(rc))
>  		atomic_set(&dev->reset_cmds_out, 0);
> 
> --
> 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
> 

--
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
diff mbox

Patch

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 1dafeb4..1d5f4fd 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -2749,11 +2749,10 @@  static int hpsa_do_reset(struct ctlr_info *h, struct hpsa_scsi_dev_t *dev,
 			lockup_detected(h));
 
 	if (unlikely(lockup_detected(h))) {
-			dev_warn(&h->pdev->dev,
-				 "Controller lockup detected during reset wait\n");
-			mutex_unlock(&h->reset_mutex);
-			rc = -ENODEV;
-		}
+		dev_warn(&h->pdev->dev,
+			 "Controller lockup detected during reset wait\n");
+		rc = -ENODEV;
+	}
 
 	if (unlikely(rc))
 		atomic_set(&dev->reset_cmds_out, 0);