Thread (2 messages) 2 messages, 1 author, 2021-06-26

Re: [PATCH] mt76/mt7915: Fix unsigned compared against zero

From: John Wood <hidden>
Date: 2021-06-26 14:31:00
Also in: linux-mediatek, linux-wireless, lkml, netdev

On Sat, Jun 12, 2021 at 04:35:05PM +0200, John Wood wrote:
The mt7915_dpd_freq_idx() function can return a negative value but this
value is assigned to an unsigned variable named idx. Then, the code
tests if this variable is less than zero. This can never happen with an
unsigned type.

So, change the idx type to a signed one.

Addresses-Coverity-ID: 1484753 ("Unsigned compared against 0")
Fixes: 495184ac91bb8 ("mt76: mt7915: add support for applying pre-calibration data")
Has anyone had time to review this patch?. Any comment on this?

Thanks,
John Wood

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help