Commit 295c0a55 authored by Mitch Williams's avatar Mitch Williams Committed by Jeff Kirsher

i40e: remove client instance on driver unload

When the driver is unloaded, we need to remove the client instance,
otherwise we leak memory.

Change-ID: If1e7882ac1f6ce15d004722fafbe31afbe0adc9a
Signed-off-by: default avatarMitch Williams <mitch.a.williams@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent bacd75cf
...@@ -459,6 +459,9 @@ int i40e_lan_del_device(struct i40e_pf *pf) ...@@ -459,6 +459,9 @@ int i40e_lan_del_device(struct i40e_pf *pf)
struct i40e_device *ldev, *tmp; struct i40e_device *ldev, *tmp;
int ret = -ENODEV; int ret = -ENODEV;
/* First, remove any client instance. */
i40e_client_del_instance(pf);
mutex_lock(&i40e_device_mutex); mutex_lock(&i40e_device_mutex);
list_for_each_entry_safe(ldev, tmp, &i40e_devices, list) { list_for_each_entry_safe(ldev, tmp, &i40e_devices, list) {
if (ldev->pf == pf) { if (ldev->pf == pf) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment