]> git.baikalelectronics.ru Git - kernel.git/commit
net/smc: consolidate unlocking in same function
authorKarsten Graul <kgraul@linux.ibm.com>
Wed, 7 Oct 2020 20:57:41 +0000 (22:57 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 10 Oct 2020 01:15:47 +0000 (18:15 -0700)
commitb845d394a6cdbb2050dc6d9a0d56b6352884d9ca
tree5d3f219cb6d7fe04abba79d52677451f548e133f
parent7e9aff66ce89ac6e85cdc1dc9790a9b3d865e016
net/smc: consolidate unlocking in same function

Static code checkers warn of inconsistent returns because the lgr mutex
is locked in one function and unlocked in a function called by the
locking function:
net/smc/af_smc.c:823 smc_connect_rdma() warn: inconsistent returns 'smc_client_lgr_pending'.
net/smc/af_smc.c:897 smc_connect_ism() warn: inconsistent returns 'smc_server_lgr_pending'.

Make the code consistent by doing the unlock in the same function that
fetches the lock. No functional changes.

Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/smc/af_smc.c