Commit f1340265 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by Tony Nguyen
Browse files

iavf: fix double-release of rtnl_lock



This code does not jump to exit on an error in iavf_lan_add_device(),
so the rtnl_unlock() from the normal path will follow.

Fixes: b66c7bc1 ("iavf: Refactor init state machine")
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Reviewed-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
Tested-by: default avatarKonrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent 3ac874fa
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1834,12 +1834,10 @@ static int iavf_init_get_resources(struct iavf_adapter *adapter)
	netif_tx_stop_all_queues(netdev);
	if (CLIENT_ALLOWED(adapter)) {
		err = iavf_lan_add_device(adapter);
		if (err) {
			rtnl_unlock();
		if (err)
			dev_info(&pdev->dev, "Failed to add VF to client API service list: %d\n",
				 err);
	}
	}
	dev_info(&pdev->dev, "MAC address: %pM\n", adapter->hw.mac.addr);
	if (netdev->features & NETIF_F_GRO)
		dev_info(&pdev->dev, "GRO is enabled\n");