Commit b6958ad0 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Kalle Valo

mt7601u: do not use WARN_ON in the datapath

Substitute WARN_ON with WARN_ON_ONCE in mt7601u_rx_next_seg_len
routine
Signed-off-by: default avatarLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Acked-by: default avatarJakub Kicinski <kubakici@wp.pl>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent a0b449dc
...@@ -124,9 +124,9 @@ static u16 mt7601u_rx_next_seg_len(u8 *data, u32 data_len) ...@@ -124,9 +124,9 @@ static u16 mt7601u_rx_next_seg_len(u8 *data, u32 data_len)
u16 dma_len = get_unaligned_le16(data); u16 dma_len = get_unaligned_le16(data);
if (data_len < min_seg_len || if (data_len < min_seg_len ||
WARN_ON(!dma_len) || WARN_ON_ONCE(!dma_len) ||
WARN_ON(dma_len + MT_DMA_HDRS > data_len) || WARN_ON_ONCE(dma_len + MT_DMA_HDRS > data_len) ||
WARN_ON(dma_len & 0x3)) WARN_ON_ONCE(dma_len & 0x3))
return 0; return 0;
return MT_DMA_HDRS + dma_len; return MT_DMA_HDRS + dma_len;
......
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