linux/drivers/net/ethernet/aquantia/atlantic
Colin Ian King 58d813afbe net: aquantia: fix unsigned numvecs comparison with less than zero
From: Colin Ian King <colin.king@canonical.com>

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>
2018-06-08 18:45:52 -04:00
..
hw_atl net: aquantia: make function aq_fw2x_get_mac_permanent static 2018-06-04 11:30:50 -04:00
Makefile net: aquantia: Introduce support for new firmware on AQC cards 2018-01-21 18:19:03 -05:00
aq_cfg.h net: aquantia: Add tx clean budget and valid budget handling logic 2018-03-22 12:02:49 -04:00
aq_common.h net: aquantia: Introduce new AQC devices and capabilities 2018-01-21 18:19:03 -05:00
aq_ethtool.c net: aquantia: Fix typo in ethtool statistics names 2017-12-15 12:46:42 -05:00
aq_ethtool.h net: ethernet: aquantia: Ethtool support 2017-01-24 15:03:41 -05:00
aq_hw.h net: aquantia: Introduce global AQC hardware reset sequence 2018-01-21 18:19:04 -05:00
aq_hw_utils.c net: aquantia: Change confusing no_ff_addr to more meaningful name 2018-01-21 18:19:03 -05:00
aq_hw_utils.h net: aquantia: Introduce firmware ops callbacks 2018-01-21 18:19:03 -05:00
aq_main.c net: aquantia: Cleanup pci functions module 2018-01-21 18:19:03 -05:00
aq_main.h net: aquantia: Simplify dependencies between pci modules 2018-01-16 14:40:00 -05:00
aq_nic.c net: aquantia: Limit number of vectors to actually allocated irqs 2018-05-08 00:06:44 -04:00
aq_nic.h net: aquantia: Limit number of vectors to actually allocated irqs 2018-05-08 00:06:44 -04:00
aq_pci_func.c net: aquantia: fix unsigned numvecs comparison with less than zero 2018-06-08 18:45:52 -04:00
aq_pci_func.h net: aquantia: Cleanup pci functions module 2018-01-21 18:19:03 -05:00
aq_ring.c net: aquantia: Add tx clean budget and valid budget handling logic 2018-03-22 12:02:49 -04:00
aq_ring.h net: aquantia: Add tx clean budget and valid budget handling logic 2018-03-22 12:02:49 -04:00
aq_rss.h net: ethernet: aquantia: Receive side scaling 2017-01-24 15:03:41 -05:00
aq_utils.h net: aquantia: Cleanup status flags accesses 2018-01-16 14:40:00 -05:00
aq_vec.c net: aquantia: Add tx clean budget and valid budget handling logic 2018-03-22 12:02:49 -04:00
aq_vec.h net: aquantia: Eliminate aq_nic structure abstraction 2018-01-16 14:40:01 -05:00
ver.h net: aquantia: driver version bump 2018-03-22 12:02:49 -04:00