提交 924b8900 编写于 作者: L Leon Romanovsky 提交者: Jason Gunthorpe

RDMA/core: Replace open-coded variant of put_device

There is an existing function to decrease reference counter
of the device, let's use it.
Reviewed-by: NMark Bloch <markb@mellanox.com>
Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
上级 b823369b
......@@ -272,7 +272,7 @@ void ib_dealloc_device(struct ib_device *device)
{
WARN_ON(device->reg_state != IB_DEV_UNREGISTERED &&
device->reg_state != IB_DEV_UNINITIALIZED);
kobject_put(&device->dev.kobj);
put_device(&device->dev);
}
EXPORT_SYMBOL(ib_dealloc_device);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册