Commit 0c1d31e9 authored by Federico Vaga's avatar Federico Vaga

sw:fw:fw: return error if no free entry available

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent f9ac16f3
......@@ -763,17 +763,13 @@ static int wrtd_out_hash_table_insert(struct trtl_fw_msg *msg_i,
return 0; /* nothing to do is a valid trigger */
hidx = wrtd_out_hash_table_free(&triggers[tidx].id);
if (hidx < 0)
goto out;
if (hidx >= FD_HASH_ENTRIES)
if (hidx < 0 || hidx >= FD_HASH_ENTRIES)
return -1;
tlist_count++;
ht[hidx] = &triggers[tidx];
msg_o->header->msg_id = msg_i->header->msg_id;
out:
return 0;
}
......
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