Messages in this thread Patch in this message | | | From | Levente Kurusa <> | Subject | [PATCH 34/38] infiniband: core: add missing put_device call | Date | Thu, 19 Dec 2013 16:06:48 +0100 |
| |
This is required so that we give up the last reference to the device.
Signed-off-by: Levente Kurusa <levex@linux.com> --- drivers/infiniband/core/sysfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c index faad2ca..bf279ce 100644 --- a/drivers/infiniband/core/sysfs.c +++ b/drivers/infiniband/core/sysfs.c @@ -824,8 +824,10 @@ int ib_device_register_sysfs(struct ib_device *device, INIT_LIST_HEAD(&device->port_list); ret = device_register(class_dev); - if (ret) + if (ret) { + put_device(class_dev); goto err; + } for (i = 0; i < ARRAY_SIZE(ib_class_attributes); ++i) { ret = device_create_file(class_dev, ib_class_attributes[i]); -- 1.8.3.1
| |