Commit 6510ecc5 authored by Martin Jeřábek's avatar Martin Jeřábek

driver: more robust circular buffer check in TX interrupt

parent 6b63eff1
...@@ -532,7 +532,7 @@ static void ctucan_tx_interrupt(struct net_device *ndev) ...@@ -532,7 +532,7 @@ static void ctucan_tx_interrupt(struct net_device *ndev)
*/ */
while ((priv->txb_head - priv->txb_tail > 0)) { while ((int)(priv->txb_head - priv->txb_tail) > 0) {
u32 txb_idx = priv->txb_tail & priv->txb_mask; u32 txb_idx = priv->txb_tail & priv->txb_mask;
u32 status = ctu_can_fd_get_tx_status(&priv->p, txb_idx); u32 status = ctu_can_fd_get_tx_status(&priv->p, txb_idx);
......
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