[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1387465612-3673-35-git-send-email-levex@linux.com>
Date: Thu, 19 Dec 2013 16:06:48 +0100
From: Levente Kurusa <levex@...ux.com>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Levente Kurusa <levex@...ux.com>,
Roland Dreier <roland@...nel.org>,
Sean Hefty <sean.hefty@...el.com>,
Hal Rosenstock <hal.rosenstock@...il.com>,
Jeff Squyres <jsquyres@...co.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Kees Cook <keescook@...omium.org>, linux-rdma@...r.kernel.org
Subject: [PATCH 34/38] infiniband: core: add missing put_device call
This is required so that we give up the last reference to the device.
Signed-off-by: Levente Kurusa <levex@...ux.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists