]> 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)
commit261e7380cff4c98766050c297b9ae1470aa26e08
treed1e50206b907c6c35775ac4eaf74ff3eb467eb89
parent81c2de8b387878fcfff70f8e5ee5a4359cad41b3
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: 93c07632429e ("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