Commit cc8f5260 authored by Dan Carpenter's avatar Dan Carpenter Committed by Martin K. Petersen

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: 6c223761 ("smartpqi: initial commit of Microsemi smartpqi driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarDon Brace <don.brace@microsemi.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 1c90836f
......@@ -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;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment