summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZheng Yongjun <zhengyongjun3@huawei.com>2020-12-08 14:54:37 +0100
committerDavid S. Miller <davem@davemloft.net>2020-12-09 01:22:54 +0100
commit6eea39266ce460243c9db417556d51a65a2bd972 (patch)
tree750c3564bcc3110a7124794e097cf1c2172feffa
parentdrivers: net: ionic: simplify the return expression of ionic_set_rxfh() (diff)
downloadlinux-6eea39266ce460243c9db417556d51a65a2bd972.tar.xz
linux-6eea39266ce460243c9db417556d51a65a2bd972.zip
drivers: net: qlcnic: simplify the return expression of qlcnic_sriov_vf_shutdown()
Simplify the return expression. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
index 30e52f969759..dd03be3fc82a 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
@@ -2112,7 +2112,6 @@ static int qlcnic_sriov_vf_shutdown(struct pci_dev *pdev)
{
struct qlcnic_adapter *adapter = pci_get_drvdata(pdev);
struct net_device *netdev = adapter->netdev;
- int retval;
netif_device_detach(netdev);
qlcnic_cancel_idc_work(adapter);
@@ -2125,11 +2124,7 @@ static int qlcnic_sriov_vf_shutdown(struct pci_dev *pdev)
qlcnic_83xx_disable_mbx_intr(adapter);
cancel_delayed_work_sync(&adapter->idc_aen_work);
- retval = pci_save_state(pdev);
- if (retval)
- return retval;
-
- return 0;
+ return pci_save_state(pdev);
}
static int qlcnic_sriov_vf_resume(struct qlcnic_adapter *adapter)