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:
Leon Romanovsky 2018-01-01 13:07:13 +02:00 committed by Jason Gunthorpe
parent b823369b6f
commit 924b8900a4
1 changed files with 1 additions and 1 deletions

View File

@ -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);