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: Mark Bloch <markb@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
parent
b823369b6f
commit
924b8900a4
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue