diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2019-05-29 07:07:39 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-06-04 22:22:29 -0400 |
commit | cc8f52609bb4177febade24d11713e20c0893b0a (patch) | |
tree | d9e81eaa0ea74e4068239984f3619d0c5a5793ab | |
parent | 1c90836f70f9a8ef7b7ad9e1fdd8961903e6ced6 (diff) |
scsi: smartpqi: unlock on error in pqi_submit_raid_request_synchronous()
We need to drop the "ctrl_info->sync_request_sem" lock before returning.
Fixes: 6c223761eb54 ("smartpqi: initial commit of Microsemi smartpqi driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/smartpqi/smartpqi_init.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index d6be4e8f4a8f..8fd5ffc55792 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c | |||
@@ -4046,8 +4046,10 @@ static int pqi_submit_raid_request_synchronous(struct pqi_ctrl_info *ctrl_info, | |||
4046 | return -ETIMEDOUT; | 4046 | return -ETIMEDOUT; |
4047 | msecs_blocked = | 4047 | msecs_blocked = |
4048 | jiffies_to_msecs(jiffies - start_jiffies); | 4048 | jiffies_to_msecs(jiffies - start_jiffies); |
4049 | if (msecs_blocked >= timeout_msecs) | 4049 | if (msecs_blocked >= timeout_msecs) { |
4050 | return -ETIMEDOUT; | 4050 | rc = -ETIMEDOUT; |
4051 | goto out; | ||
4052 | } | ||
4051 | timeout_msecs -= msecs_blocked; | 4053 | timeout_msecs -= msecs_blocked; |
4052 | } | 4054 | } |
4053 | } | 4055 | } |