IB/core: Remove unneeded kobject_get/put calls
authorHaggai Eran <haggaie@mellanox.com>
Sun, 18 May 2014 08:12:24 +0000 (11:12 +0300)
committerRoland Dreier <roland@purestorage.com>
Wed, 4 Jun 2014 17:03:49 +0000 (10:03 -0700)
The ib_core module will call kobject_get on the parent object of each
kobject it creates.  This is redundant since kobject_add does that
anyway.

As a side effect, this patch should fix leaking the ports kobject and
the device kobject during unregister flow, since the previous code
didn't seem to take into account the kobject_get calls on behalf of
the child kobjects.

Signed-off-by: Haggai Eran <haggaie@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/core/sysfs.c

Simple merge