提交 627212c9 编写于 作者: P Parav Pandit 提交者: Jason Gunthorpe

RDMA/core: Replace open-coded variant of get_device

Reuse existing get_device() API to do it symmetric to already used
put_device() in commit 924b8900 ("RDMA/core: Replace open-coded
variant of put_device")
Signed-off-by: NParav Pandit <parav@mellanox.com>
Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
上级 6ceb6331
......@@ -1359,8 +1359,8 @@ void ib_device_unregister_sysfs(struct ib_device *device)
{
int i;
/* Hold kobject until ib_dealloc_device() */
kobject_get(&device->dev.kobj);
/* Hold device until ib_dealloc_device() */
get_device(&device->dev);
free_port_list_attributes(device);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册