Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a09ba13e authored by Asai Thambi S P's avatar Asai Thambi S P Committed by Jens Axboe
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarAsai Thambi S P <asamymuthupa@micron.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent d88a440e
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -2510,8 +2510,10 @@ static struct scatterlist *mtip_hw_get_scatterlist(struct driver_data *dd,
		up(&dd->port->cmd_slot);
		up(&dd->port->cmd_slot);
		return NULL;
		return NULL;
	}
	}
	if (unlikely(*tag < 0))
	if (unlikely(*tag < 0)) {
		up(&dd->port->cmd_slot);
		return NULL;
		return NULL;
	}


	return dd->port->commands[*tag].sg;
	return dd->port->commands[*tag].sg;
}
}