drivers: can: loopback: add log message for full TX msgq
Emit a debug log message if the TX message queue is full. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
728138023b
commit
efd0d3ba96
1 changed files with 5 additions and 1 deletions
|
@ -144,8 +144,12 @@ static int can_loopback_send(const struct device *dev,
|
|||
loopback_frame.cb_arg = user_data;
|
||||
|
||||
ret = k_msgq_put(&data->tx_msgq, &loopback_frame, timeout);
|
||||
if (ret < 0) {
|
||||
LOG_DBG("TX queue full (err %d)", ret);
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
return ret ? -EAGAIN : 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue