diff options
author | Lorenzo Bianconi <lorenzo.bianconi@redhat.com> | 2019-01-22 16:39:34 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-02-01 14:41:19 +0200 |
commit | b6958ad021c1f46675aa6d3602ce0d241a45785d (patch) | |
tree | c04ed7f27336b0425ebff71b6891dd480d17d1b6 /drivers/net/wireless/mediatek/mt7601u/dma.c | |
parent | a0b449dc4c6701c55c3682abe1d331c336189adb (diff) | |
download | linux-b6958ad021c1f46675aa6d3602ce0d241a45785d.tar.gz |
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: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Acked-by: Jakub Kicinski <kubakici@wp.pl>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt7601u/dma.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt7601u/dma.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/mediatek/mt7601u/dma.c b/drivers/net/wireless/mediatek/mt7601u/dma.c index 7f3e3983b781..f7edeffb2b19 100644 --- a/drivers/net/wireless/mediatek/mt7601u/dma.c +++ b/drivers/net/wireless/mediatek/mt7601u/dma.c @@ -124,9 +124,9 @@ static u16 mt7601u_rx_next_seg_len(u8 *data, u32 data_len) u16 dma_len = get_unaligned_le16(data); if (data_len < min_seg_len || - WARN_ON(!dma_len) || - WARN_ON(dma_len + MT_DMA_HDRS > data_len) || - WARN_ON(dma_len & 0x3)) + WARN_ON_ONCE(!dma_len) || + WARN_ON_ONCE(dma_len + MT_DMA_HDRS > data_len) || + WARN_ON_ONCE(dma_len & 0x3)) return 0; return MT_DMA_HDRS + dma_len; |