]> git.baikalelectronics.ru Git - kernel.git/commitdiff
i40e: Make i40e_shutdown_adminq() return void
authorJason Yan <yanaijie@huawei.com>
Wed, 6 May 2020 06:18:35 +0000 (14:18 +0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 29 May 2020 03:19:47 +0000 (20:19 -0700)
Fix the following coccicheck warning:

drivers/net/ethernet/intel/i40e/i40e_adminq.c:699:13-21: Unneeded
variable: "ret_code". Return "0" on line 710

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_adminq.c
drivers/net/ethernet/intel/i40e/i40e_prototype.h

index 37514a75f9288c94c026daee1947b191251b44b4..6a089848c85732770bbd129870658a904d9f13df 100644 (file)
@@ -694,10 +694,8 @@ init_adminq_exit:
  *  i40e_shutdown_adminq - shutdown routine for the Admin Queue
  *  @hw: pointer to the hardware structure
  **/
-i40e_status i40e_shutdown_adminq(struct i40e_hw *hw)
+void i40e_shutdown_adminq(struct i40e_hw *hw)
 {
-       i40e_status ret_code = 0;
-
        if (i40e_check_asq_alive(hw))
                i40e_aq_queue_shutdown(hw, true);
 
@@ -706,8 +704,6 @@ i40e_status i40e_shutdown_adminq(struct i40e_hw *hw)
 
        if (hw->nvm_buff.va)
                i40e_free_virt_mem(hw, &hw->nvm_buff);
-
-       return ret_code;
 }
 
 /**
index bbb478f09093ca1418eb965c299ab32d9a99f8d9..5c1378641b3bce67317fad8cdb4584da70667898 100644 (file)
@@ -17,7 +17,7 @@
 
 /* adminq functions */
 i40e_status i40e_init_adminq(struct i40e_hw *hw);
-i40e_status i40e_shutdown_adminq(struct i40e_hw *hw);
+void i40e_shutdown_adminq(struct i40e_hw *hw);
 void i40e_adminq_init_ring_data(struct i40e_hw *hw);
 i40e_status i40e_clean_arq_element(struct i40e_hw *hw,
                                             struct i40e_arq_event_info *e,