]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ixgbe: don't initialize aci lock in ixgbe_recovery_probe()
authorKohei Enju <enjuk@amazon.com>
Thu, 11 Dec 2025 09:15:32 +0000 (18:15 +0900)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 27 Jan 2026 21:50:09 +0000 (13:50 -0800)
hw->aci.lock is already initialized in ixgbe_sw_init(), so
ixgbe_recovery_probe() doesn't need to initialize the lock. This
function is also not responsible for destroying the lock on failures.

Additionally, change the name of label in accordance with this change.

Fixes: 29cb3b8d95c7 ("ixgbe: add E610 implementation of FW recovery mode")
Reported-by: Simon Horman <horms@kernel.org>
Closes: https://lore.kernel.org/intel-wired-lan/aTcFhoH-z2btEKT-@horms.kernel.org/
Signed-off-by: Kohei Enju <enjuk@amazon.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

index a69b5a8a91cb23652494d412e6d2689cfb792d3b..c58051e4350be2a597a698a769e9520656597892 100644 (file)
@@ -11476,10 +11476,9 @@ static int ixgbe_recovery_probe(struct ixgbe_adapter *adapter)
                return err;
 
        ixgbe_get_hw_control(adapter);
-       mutex_init(&hw->aci.lock);
        err = ixgbe_get_flash_data(&adapter->hw);
        if (err)
-               goto shutdown_aci;
+               goto err_release_hw_control;
 
        timer_setup(&adapter->service_timer, ixgbe_service_timer, 0);
        INIT_WORK(&adapter->service_task, ixgbe_recovery_service_task);
@@ -11502,8 +11501,7 @@ static int ixgbe_recovery_probe(struct ixgbe_adapter *adapter)
        devl_unlock(adapter->devlink);
 
        return 0;
-shutdown_aci:
-       mutex_destroy(&adapter->hw.aci.lock);
+err_release_hw_control:
        ixgbe_release_hw_control(adapter);
        return err;
 }