]> git.baikalelectronics.ru Git - kernel.git/commit
IB/core: Make ib_alloc_device init the kobject
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Tue, 4 Aug 2015 21:23:34 +0000 (15:23 -0600)
committerDoug Ledford <dledford@redhat.com>
Sun, 30 Aug 2015 22:08:50 +0000 (18:08 -0400)
commit3075ca2afc799f0ef7ac73af11396fdfdb6a531f
treeb44faef6b5eff332fb0317a6802de01c98b92742
parent7b6244f0955aa11c7c9185cb2e072f7490deae20
IB/core: Make ib_alloc_device init the kobject

This gets rid of the weird in-between state where struct ib_device
was allocated but the kobject didn't work.

Consequently ib_device_release is now guaranteed to be called in
all situations and we needn't duplicate its kfrees on error paths.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/cache.c
drivers/infiniband/core/core_priv.h
drivers/infiniband/core/device.c
drivers/infiniband/core/sysfs.c