]> www.infradead.org Git - users/jedix/linux-maple.git/commit
qlcnic: check pci_reset_function result
authorDenis Plotnikov <den-plotnikov@yandex-team.ru>
Fri, 7 Apr 2023 07:18:49 +0000 (10:18 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Apr 2023 10:35:09 +0000 (12:35 +0200)
commitf517b5ee826a8897641f7cd682ec7e173f5f3c39
tree483ee9135f2b0c78b2d4cae10a69b175e7f17f00
parent09f4dec1f6accc57dd319bb101a5dcc6f40bc7e9
qlcnic: check pci_reset_function result

[ Upstream commit 7573099e10ca69c3be33995c1fcd0d241226816d ]

Static code analyzer complains to unchecked return value.
The result of pci_reset_function() is unchecked.
Despite, the issue is on the FLR supported code path and in that
case reset can be done with pcie_flr(), the patch uses less invasive
approach by adding the result check of pci_reset_function().

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 7e2cf4feba05 ("qlcnic: change driver hardware interface mechanism")
Signed-off-by: Denis Plotnikov <den-plotnikov@yandex-team.ru>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c