Files
linux/drivers
Colin Ian King d0345e21ec net: aquantia: fix unsigned numvecs comparison with less than zero
commit 58d813afbe upstream.

This was originally mistakenly submitted to net-next. Resubmitting to net.

The comparison of numvecs < 0 is always false because numvecs is a u32
and hence the error return from a failed call to pci_alloc_irq_vectores
is never detected.  Fix this by using the signed int ret to handle the
error return and assign numvecs to err.

Detected by CoverityScan, CID#1468650 ("Unsigned compared against 0")

Fixes: a09bd81b54 ("net: aquantia: Limit number of vectors to actually allocated irqs")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Holger Hoffstätte <holger@applied-asynchrony.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-26 07:51:16 +08:00
..
2018-05-29 09:59:53 -04:00
2018-06-16 09:18:24 +02:00
2018-04-19 15:11:50 -07:00
2018-03-27 09:51:22 +02:00
2018-05-29 20:14:32 +02:00
2018-05-22 13:48:34 -04:00
2018-04-18 23:37:25 -04:00
2018-03-29 13:38:10 +03:00