]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
RDMA/i40iw: Fix error unwinding when i40iw_hmc_sd_one fails
authorSindhu Devale <sindhu.devale@intel.com>
Fri, 16 Apr 2021 00:21:04 +0000 (19:21 -0500)
committerKelsey Skunberg <kelsey.skunberg@canonical.com>
Mon, 24 May 2021 23:46:41 +0000 (17:46 -0600)
commit1c0ce432b9a3dfdabd68744dff56da965b1771a8
tree4fb46223fe822d1fa52b87b4df76ad30cab873a9
parent1225f18f6179c3186a2598c85624dbd9cad0bfcd
RDMA/i40iw: Fix error unwinding when i40iw_hmc_sd_one fails

BugLink: https://bugs.launchpad.net/bugs/1929455
[ Upstream commit 783a11bf2400e5d5c42a943c3083dc0330751842 ]

When i40iw_hmc_sd_one fails, chunk is freed without the deletion of chunk
entry in the PBLE info list.

Fix it by adding the chunk entry to the PBLE info list only after
successful addition of SD in i40iw_hmc_sd_one.

This fixes a static checker warning reported here:
  https://lore.kernel.org/linux-rdma/YHV4CFXzqTm23AOZ@mwanda/

Fixes: 9715830157be ("i40iw: add pble resource files")
Link: https://lore.kernel.org/r/20210416002104.323-1-shiraz.saleem@intel.com
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sindhu Devale <sindhu.devale@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/infiniband/hw/i40iw/i40iw_pble.c