]> git.baikalelectronics.ru Git - kernel.git/commit
net: mana: Use int to check the return value of mana_gd_poll_cq()
authorDexuan Cui <decui@microsoft.com>
Thu, 22 Apr 2021 20:08:16 +0000 (13:08 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Apr 2021 20:16:29 +0000 (13:16 -0700)
commit44e80642892809e304b15e7b6fb7f3c6971a37fa
treed1e50206b907c6c35775ac4eaf74ff3eb467eb89
parent22a259c3c4e715ca580b6c77374078af73a8fce1
net: mana: Use int to check the return value of mana_gd_poll_cq()

mana_gd_poll_cq() may return -1 if an overflow error is detected (this
should never happen unless there is a bug in the driver or the hardware).

Fix the type of the variable "comp_read" by using int rather than u32.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: def7660dad5e ("net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)")
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/microsoft/mana/hw_channel.c
drivers/net/ethernet/microsoft/mana/mana_en.c