mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
mtip32xx: release the semaphore on an error path
Release the semaphore in an error path in mtip_hw_get_scatterlist(). This fixes the smatch warning inconsistent returns. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
d88a440edd
commit
a09ba13eef
1 changed files with 3 additions and 1 deletions
|
@ -2510,8 +2510,10 @@ static struct scatterlist *mtip_hw_get_scatterlist(struct driver_data *dd,
|
|||
up(&dd->port->cmd_slot);
|
||||
return NULL;
|
||||
}
|
||||
if (unlikely(*tag < 0))
|
||||
if (unlikely(*tag < 0)) {
|
||||
up(&dd->port->cmd_slot);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return dd->port->commands[*tag].sg;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue