]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
net: chelsio: cxgb3: check the return value of pci_find_capability()
authorJia-Ju Bai <baijiaju1990@gmail.com>
Fri, 25 Feb 2022 12:37:27 +0000 (04:37 -0800)
committerPaolo Pisati <paolo.pisati@canonical.com>
Wed, 9 Mar 2022 14:17:56 +0000 (15:17 +0100)
commit31edbe78a60b6da88235f0c4fed005b4e6f8a5a9
tree5e98f80e32572e5f80e3e696a13b9098a9e9a38e
parent42d36f09b4094cca7b14bad57aa4ef5eabd3bbe3
net: chelsio: cxgb3: check the return value of pci_find_capability()

BugLink: https://bugs.launchpad.net/bugs/1964361
[ Upstream commit 767b9825ed1765894e569a3d698749d40d83762a ]

The function pci_find_capability() in t3_prep_adapter() can fail, so its
return value should be checked.

Fixes: 4d22de3e6cc4 ("Add support for the latest 1G/10G Chelsio adapter, T3")
Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/net/ethernet/chelsio/cxgb3/t3_hw.c