Commit 924b8900 authored by Leon Romanovsky's avatar Leon Romanovsky Committed by 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: default avatarMark Bloch <markb@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent b823369b
...@@ -272,7 +272,7 @@ void ib_dealloc_device(struct ib_device *device) ...@@ -272,7 +272,7 @@ void ib_dealloc_device(struct ib_device *device)
{ {
WARN_ON(device->reg_state != IB_DEV_UNREGISTERED && WARN_ON(device->reg_state != IB_DEV_UNREGISTERED &&
device->reg_state != IB_DEV_UNINITIALIZED); device->reg_state != IB_DEV_UNINITIALIZED);
kobject_put(&device->dev.kobj); put_device(&device->dev);
} }
EXPORT_SYMBOL(ib_dealloc_device); EXPORT_SYMBOL(ib_dealloc_device);
......
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