]> git.baikalelectronics.ru Git - 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)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 Feb 2022 12:52:05 +0000 (12:52 +0000)
commit04a0339f3dfe58cbce53305722541bce6f6d64d5
tree0ac12e6b18aecd552af761319c970f9ee0885697
parent4879707eb2a50b68ba2f2767a0fbb25f8e426b57
net: chelsio: cxgb3: check the return value of pci_find_capability()

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

Fixes: d47baaec2468 ("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>
drivers/net/ethernet/chelsio/cxgb3/t3_hw.c