Skip to content
Commit d45f89d5 authored by Jason Gunthorpe's avatar Jason Gunthorpe
Browse files

RDMA/device: Call ib_cache_release_one() only from ib_device_release()



Instead of complicated logic about when this memory is freed, always free
it during device release(). All the cache pointers start out as NULL, so
it is safe to call this before the cache is initialized.

This makes for a simpler error unwind flow, and a simpler understanding of
the lifetime of the memory allocations inside the struct ib_device.

Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent b34b269a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment