Commit 47aeed9d authored by Yang Yingliang's avatar Yang Yingliang Committed by David S. Miller

net: hns: hnae: remove unnecessary __module_get() and module_put()

hnae_ae_register() is called from hns_dsaf_probe(), the refcount of
module hnae has already be got in resolve_symbol() while calling the
function, so the __module_get()/module_put() can be removed.
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 738136a0
......@@ -424,8 +424,6 @@ int hnae_ae_register(struct hnae_ae_dev *hdev, struct module *owner)
return ret;
}
__module_get(THIS_MODULE);
INIT_LIST_HEAD(&hdev->handle_list);
spin_lock_init(&hdev->lock);
......@@ -445,7 +443,6 @@ EXPORT_SYMBOL(hnae_ae_register);
void hnae_ae_unregister(struct hnae_ae_dev *hdev)
{
device_unregister(&hdev->cls_dev);
module_put(THIS_MODULE);
}
EXPORT_SYMBOL(hnae_ae_unregister);
......
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