ibmvnic: Free rwi on reset success
authorNick Child <nnac123@linux.ibm.com>
Mon, 31 Oct 2022 15:06:42 +0000 (10:06 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Nov 2022 17:15:31 +0000 (18:15 +0100)
commit535b78739ae75f257c894a05b1afa86ad9a3669e
tree39984514a370ce6fb081cefb3be9a81fc0366335
parent985a88bf0b27193522bba7856b1763f428cef19d
ibmvnic: Free rwi on reset success

[ Upstream commit d6dd2fe71153f0ff748bf188bd4af076fe09a0a6 ]

Free the rwi structure in the event that the last rwi in the list
processed successfully. The logic in commit 4f408e1fa6e1 ("ibmvnic:
retry reset if there are no other resets") introduces an issue that
results in a 32 byte memory leak whenever the last rwi in the list
gets processed.

Fixes: 4f408e1fa6e1 ("ibmvnic: retry reset if there are no other resets")
Signed-off-by: Nick Child <nnac123@linux.ibm.com>
Link: https://lore.kernel.org/r/20221031150642.13356-1-nnac123@linux.ibm.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/ibm/ibmvnic.c