diff --git a/net/can/af_can.c b/net/can/af_can.c index 8bacf281b3ee0b0ee42c2b10c8f7c23550e7ca9b..c4e50852c9f4aa8e195ed57e711890210cea1e1c 100644 --- a/net/can/af_can.c +++ b/net/can/af_can.c @@ -546,16 +546,13 @@ void can_rx_unregister(struct net_device *dev, canid_t can_id, canid_t mask, } /* - * Check for bugs in CAN protocol implementations: - * If no matching list item was found, the list cursor variable next - * will be NULL, while r will point to the last item of the list. + * Check for bugs in CAN protocol implementations using af_can.c: + * 'r' will be NULL if no matching list item was found for removal. */ if (!r) { - pr_err("BUG: receive list entry not found for " - "dev %s, id %03X, mask %03X\n", - DNAME(dev), can_id, mask); - r = NULL; + WARN(1, "BUG: receive list entry not found for dev %s, " + "id %03X, mask %03X\n", DNAME(dev), can_id, mask); goto out; }