RDMA/cma: add missed unregister_pernet_subsys in init failure
authorChuhong Yuan <hslester96@gmail.com>
Fri, 6 Dec 2019 01:24:26 +0000 (09:24 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2020 09:17:51 +0000 (10:17 +0100)
commite47a078195d365e883a7dc36e0701552e383a47c
treee23d77c4df64aa72056266a1ff0b2188c1f8a751
parentb5f565ba27cbca21432d2cb8e2a2da905715ab7e
RDMA/cma: add missed unregister_pernet_subsys in init failure

[ Upstream commit 44a7b6759000ac51b92715579a7bba9e3f9245c2 ]

The driver forgets to call unregister_pernet_subsys() in the error path
of cma_init().
Add the missed call to fix it.

Fixes: 4be74b42a6d0 ("IB/cma: Separate port allocation to network namespaces")
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Reviewed-by: Parav Pandit <parav@mellanox.com>
Link: https://lore.kernel.org/r/20191206012426.12744-1-hslester96@gmail.com
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/core/cma.c