From 627212c9d49ba2759b699450f5d8f45f73e062fa Mon Sep 17 00:00:00 2001 From: Parav Pandit Date: Mon, 3 Sep 2018 20:20:25 +0300 Subject: [PATCH] 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 924b8900a49d ("RDMA/core: Replace open-coded variant of put_device") Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe --- drivers/infiniband/core/sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c index 7fd14ea..62351b3 100644 --- a/drivers/infiniband/core/sysfs.c +++ b/drivers/infiniband/core/sysfs.c @@ -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); -- 2.7.4