IB/cm: Tidy remaining cm_msg free paths
authorJason Gunthorpe <jgg@nvidia.com>
Wed, 2 Jun 2021 10:27:04 +0000 (13:27 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 2 Jun 2021 18:41:57 +0000 (15:41 -0300)
commitefafae671707524608889d904f59b0f7bad87a0e
tree1da7a6543fcb39c1d640a8abb2ff93983961cd6c
parentc1cf6d9f743aad09b231752c12845ba7083b28f7
IB/cm: Tidy remaining cm_msg free paths

Now that all the free paths are explicit cm_free_msg() will only be called
for msgs's allocated with cm_alloc_msg(), so we can assume the context is
set. Place it after the allocation function it is paired with for clarity.

Also remove a bogus NULL assignment in one place after a cancel. This does
nothing other than disable completions to become events, but changing the
state already did that.

Link: https://lore.kernel.org/r/082fd3552be0d1a2c19b1c4cefb5f3f0e3e68e82.1622629024.git.leonro@nvidia.com
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/core/cm.c