summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornorly <ny-git@enpas.org>2022-02-05 05:58:47 +0100
committernorly <ny-git@enpas.org>2022-02-05 05:58:47 +0100
commit56aea2e8b5a42e7fb6512a1f6945aa2e1af0002c (patch)
tree9037afb5be367cc07fd94e2082851e20dc185864
parent8eb5e5a8347a93af37de8d0ed66eab11d4d7a357 (diff)
Change WARN_ON into WARN_ON_ONCE
-rw-r--r--module/elmcan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/elmcan.c b/module/elmcan.c
index 6c99ca0..7ae344e 100644
--- a/module/elmcan.c
+++ b/module/elmcan.c
@@ -788,7 +788,7 @@ static struct sk_buff *elmcan_mailbox_read(struct can_rx_offload *offload,
unsigned int n, u32 *timestamp,
bool drop)
{
- WARN_ON(1); /* This function is a dummy, so don't call it! */
+ WARN_ON_ONCE(1); /* This function is a dummy, so don't call it! */
return ERR_PTR(-ENOBUFS);
}
@@ -891,7 +891,7 @@ static netdev_tx_t elmcan_netdev_start_xmit(struct sk_buff *skb,
/* We shouldn't get here after a hardware fault:
* can_bus_off() calls netif_carrier_off()
*/
- WARN_ON(elm->hw_failure);
+ WARN_ON_ONCE(elm->hw_failure);
if (!elm->tty ||
elm->hw_failure ||