Commit 0c36d7ee authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

scsi: smartpqi: unlock on error in pqi_submit_raid_request_synchronous()

[ Upstream commit cc8f5260 ]

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>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 284be683
......@@ -4044,8 +4044,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