mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 13:11:40 +00:00
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: b66c7bc1cd
("iavf: Refactor init state machine")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
This commit is contained in:
parent
3ac874fa84
commit
f134026572
@ -1834,11 +1834,9 @@ 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)
|
||||
|
Loading…
Reference in New Issue
Block a user