mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
habanalabs: remove duplicate check
We already check if queue index is smaller than max queues a few lines above this check so no need to check this again. Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
This commit is contained in:
parent
06f791f74f
commit
becce5f994
1 changed files with 4 additions and 3 deletions
|
@ -946,9 +946,10 @@ static int cs_ioctl_signal_wait(struct hl_fpriv *hpriv, enum hl_cs_type cs_type,
|
|||
hw_queue_prop = &hdev->asic_prop.hw_queues_props[q_idx];
|
||||
q_type = hw_queue_prop->type;
|
||||
|
||||
if ((q_idx >= hdev->asic_prop.max_queues) ||
|
||||
(!hw_queue_prop->supports_sync_stream)) {
|
||||
dev_err(hdev->dev, "Queue index %d is invalid\n", q_idx);
|
||||
if (!hw_queue_prop->supports_sync_stream) {
|
||||
dev_err(hdev->dev,
|
||||
"Queue index %d does not support sync stream operations\n",
|
||||
q_idx);
|
||||
rc = -EINVAL;
|
||||
goto free_cs_chunk_array;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue