]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ibmvnic: remove never executed if statement
authorLijun Pan <ljp@linux.ibm.com>
Wed, 19 Aug 2020 22:52:25 +0000 (17:52 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Aug 2020 23:11:33 +0000 (16:11 -0700)
At the beginning of the function, from_passive_init is set false by
"adapter->from_passive_init = false;",
hence the if statement will never run.

Signed-off-by: Lijun Pan <ljp@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/ibmvnic.c

index 4e0a6cbd148893f07b6e2c9149d7cef6b345b510..15e5b26933feb6aaf0ee386468c1ce7cd7da7fab 100644 (file)
@@ -5017,12 +5017,6 @@ static int ibmvnic_reset_init(struct ibmvnic_adapter *adapter)
                return adapter->init_done_rc;
        }
 
-       if (adapter->from_passive_init) {
-               adapter->state = VNIC_OPEN;
-               adapter->from_passive_init = false;
-               return -1;
-       }
-
        if (test_bit(0, &adapter->resetting) && !adapter->wait_for_reset &&
            adapter->reset_reason != VNIC_RESET_MOBILITY) {
                if (adapter->req_rx_queues != old_num_rx_queues ||
@@ -5076,12 +5070,6 @@ static int ibmvnic_init(struct ibmvnic_adapter *adapter)
                return adapter->init_done_rc;
        }
 
-       if (adapter->from_passive_init) {
-               adapter->state = VNIC_OPEN;
-               adapter->from_passive_init = false;
-               return -1;
-       }
-
        rc = init_sub_crqs(adapter);
        if (rc) {
                dev_err(dev, "Initialization of sub crqs failed\n");