Skip to content

Commit

Permalink
scsi: smartpqi: unlock on error in pqi_submit_raid_request_synchronous()
Browse files Browse the repository at this point in the history
We need to drop the "ctrl_info->sync_request_sem" lock before returning.

Fixes: 6c22376 ("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>
  • Loading branch information
Dan Carpenter authored and Martin K. Petersen committed Jun 5, 2019
1 parent 1c90836 commit cc8f526
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/scsi/smartpqi/smartpqi_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -4046,8 +4046,10 @@ static int pqi_submit_raid_request_synchronous(struct pqi_ctrl_info *ctrl_info,
return -ETIMEDOUT;
msecs_blocked =
jiffies_to_msecs(jiffies - start_jiffies);
if (msecs_blocked >= timeout_msecs)
return -ETIMEDOUT;
if (msecs_blocked >= timeout_msecs) {
rc = -ETIMEDOUT;
goto out;
}
timeout_msecs -= msecs_blocked;
}
}
Expand Down

0 comments on commit cc8f526

Please sign in to comment.