[PATCH 1/7] can: rx-offload: continue on error
From: Jeroen Hofstee
Date: Tue Sep 24 2019 - 14:45:45 EST
While can_rx_offload_offload_one will call mailbox_read to discard
the mailbox in case of an error, can_rx_offload_irq_offload_timestamp
bails out in the error case. Since it is typically called from a while
loop, all message will eventually be discarded. So lets continue on
error instead to discard them directly.
Signed-off-by: Jeroen Hofstee <jhofstee@xxxxxxxxxxxxxxxxx>
---
drivers/net/can/rx-offload.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/rx-offload.c b/drivers/net/can/rx-offload.c
index e6a668ee7730..39df41280e2d 100644
--- a/drivers/net/can/rx-offload.c
+++ b/drivers/net/can/rx-offload.c
@@ -158,7 +158,7 @@ int can_rx_offload_irq_offload_timestamp(struct can_rx_offload *offload, u64 pen
skb = can_rx_offload_offload_one(offload, i);
if (!skb)
- break;
+ continue;
__skb_queue_add_sort(&skb_queue, skb, can_rx_offload_compare);
}
--
2.17.1