* Take a reference on the module.
*/
try_module_get(THIS_MODULE);
+
+ dev_hold(vf_netdev);
net_device_ctx->vf_netdev = vf_netdev;
return NOTIFY_OK;
}
netdev_info(ndev, "VF unregistering: %s\n", vf_netdev->name);
netvsc_inject_disable(net_device_ctx);
net_device_ctx->vf_netdev = NULL;
+ dev_put(vf_netdev);
module_put(THIS_MODULE);
return NOTIFY_OK;
}