net/smc: cleanup buffer usage in smc_listen_work()
authorKarsten Graul <kgraul@linux.ibm.com>
Wed, 7 Oct 2020 20:57:42 +0000 (22:57 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 10 Oct 2020 01:15:47 +0000 (18:15 -0700)
commit9047a617dc2f8ea0575ef80c38e57ed52b712a1f
treefe753701031987c1339963808b2e264bc97462af
parentc60a2cefb32d2f0e88141b942f92d94bd69bb56f
net/smc: cleanup buffer usage in smc_listen_work()

coccinelle informs about
net/smc/af_smc.c:1770:10-11: WARNING: opportunity for kzfree/kvfree_sensitive

Its not that kzfree() would help here, the memset() is done to prepare
the buffer for another socket receive.
Fix that warning message by reordering the calls, while at it eliminate
the unneeded variable cclc2 and use sizeof(*buf) as above in the same
function. 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