aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/ethernet/hisilicon/hns/hnae.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2022-10-28 15:34:57 +0800
committerDavid S. Miller <davem@davemloft.net>2022-10-31 09:18:14 +0000
commit47aeed9d2ccde99c990ba3163b8d8308ad00df1b (patch)
tree6f974602235d9cfa8f54fb7c76e055babc46724f /drivers/net/ethernet/hisilicon/hns/hnae.c
parentnetlink: split up copies in the ack construction (diff)
downloadwireguard-linux-47aeed9d2ccde99c990ba3163b8d8308ad00df1b.tar.xz
wireguard-linux-47aeed9d2ccde99c990ba3163b8d8308ad00df1b.zip
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: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/hisilicon/hns/hnae.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hnae.c b/drivers/net/ethernet/hisilicon/hns/hnae.c
index 430eccea8e5e..9b26f0f2c748 100644
--- a/drivers/net/ethernet/hisilicon/hns/hnae.c
+++ b/drivers/net/ethernet/hisilicon/hns/hnae.c
@@ -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);