IB/cm: Refactor cm_insert_listen() and cm_find_listen()

Move the device and service_id match code at the top of
cm_insert_listen() and cm_find_listen() into the final else branch.

Link: https://lore.kernel.org/r/20220819090859.957943-4-markzhang@nvidia.com
Signed-off-by: Mark Zhang <markzhang@nvidia.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
Mark Zhang 2022-08-19 12:08:59 +03:00 • committed by Leon Romanovsky
commit 637ff8ea00