linux/drivers/net/ethernet
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
..
3com Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-05-21 16:01:54 -04:00
8390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-05-21 16:01:54 -04:00
adaptec
aeroflex
agere
alacritech
allwinner
alteon
altera
amazon
amd Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-05-26 19:46:15 -04:00
apm
apple
aquantia net: aquantia: fix unsigned numvecs comparison with less than zero 2018-06-08 18:45:52 -04:00
arc
atheros
aurora
broadcom bnx2x: use the right constant 2018-06-06 14:01:03 -04:00
brocade
cadence drivers: net: Remove device_node checks with of_mdiobus_register() 2018-05-16 14:20:36 -04:00
calxeda
cavium drivers/net: Fix various unnecessary characters after logging newlines 2018-05-30 13:24:08 -04:00
chelsio net: chelsio: Use zeroing memory allocator instead of allocator/memset 2018-06-04 16:07:30 -04:00
cirrus
cisco enic: fix UDP rss bits 2018-06-06 09:09:09 -04:00
cortina net: gemini: fix spelling mistake: "it" -> "is" 2018-06-04 17:05:39 -04:00
davicom
dec
dlink
emulex be2net: Fix error detection logic for BE3 2018-05-29 10:57:25 -04:00
ezchip
faraday
freescale net: ethernet: freescale: fix false-positive string overflow warning 2018-05-30 13:16:44 -04:00
fujitsu
hisilicon net: hns3: Optimize PF CMDQ interrupt switching process 2018-06-06 14:02:48 -04:00
hp
huawei net-next/hinic: add pci device ids for 25ge and 100ge card 2018-05-08 00:07:42 -04:00
i825xx
ibm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-05-26 19:46:15 -04:00
intel Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2018-06-05 12:42:19 -04:00
marvell net: mvpp2: mvpp2_percpu_read_relaxed() can be static 2018-06-04 11:36:29 -04:00
mediatek net: mediatek: use of_device_get_match_data() 2018-04-16 13:43:07 -04:00
mellanox Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-06-06 18:39:49 -07:00
micrel
microchip
moxa
mscc net: mscc: ocelot: Fix uninitialized error in ocelot_netdevice_event() 2018-06-07 16:54:39 -04:00
myricom
natsemi net/sonic: Use dma_mapping_error() 2018-05-31 14:17:33 -04:00
neterion net: vxge: fix spelling mistake in macro VXGE_HW_ERR_PRIVILAGED_OPEARATION 2018-05-23 14:50:02 -04:00
netronome devlink: Add extack to reload and port_{un, }split operations 2018-06-05 12:32:37 -04:00
ni net: nixge: Address compiler warnings about signedness 2018-05-07 23:30:03 -04:00
nuvoton
nvidia
nxp
oki-semi
packetengines
pasemi
qlogic qed*: Utilize FW 8.37.2.0 2018-06-05 10:48:09 -04:00
qualcomm net: qualcomm: rmnet: Fix use after free while sending command ack 2018-06-05 10:17:05 -04:00
rdc
realtek 8139too: Remove unnecessary netif_napi_del() 2018-05-25 16:35:45 -04:00
renesas sh_eth: use DIV_ROUND_UP() in sh_eth_soft_swap() 2018-06-04 15:23:25 -04:00
rocker rocker: rocker_main: Ignore bridge VLAN events 2018-05-31 14:13:43 -04:00
samsung
seeq
sfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-06-06 18:39:49 -07:00
sgi
silan
sis
smsc
socionext Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-06-03 09:31:58 -04:00
stmicro net: stmmac: fix build failure due to missing COMMON_CLK dependency 2018-06-08 10:59:08 -04:00
sun net: ethernet: sun: niu set correct packet size in skb 2018-05-04 13:20:46 -04:00
synopsys
tehuti
ti net: netcp: ethss: remove unnecessary pointer set to NULL 2018-06-03 10:39:48 -04:00
toshiba
tundra
via
wiznet
xilinx net: axienet: remove stale comment of axienet_open 2018-06-03 10:59:32 -04:00
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c net: ethoc: Remove useless test before clk_disable_unprepare 2018-05-16 14:44:29 -04:00
fealnx.c
jme.c
jme.h
Kconfig net: ethernet: Sort Kconfig sourcing alphabetically 2018-05-21 12:14:47 -04:00
korina.c
lantiq_etop.c
Makefile net: mscc: Add initial Ocelot switch support 2018-05-15 16:41:15 -04:00
netx-eth.c