stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Tanmay Bhushan <007047221b@gmail.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	Zhu Lingshan <lingshan.zhu@intel.com>,
	Sasha Levin <sashal@kernel.org>,
	gautam.dawar@xilinx.com, trix@redhat.com, jiaming@nfschina.com,
	virtualization@lists.linux-foundation.org
Subject: [PATCH AUTOSEL 6.1 14/38] vdpa: ifcvf: Do proper cleanup if IFCVF init fails
Date: Thu,  9 Feb 2023 06:14:33 -0500	[thread overview]
Message-ID: <20230209111459.1891941-14-sashal@kernel.org> (raw)
In-Reply-To: <20230209111459.1891941-1-sashal@kernel.org>

From: Tanmay Bhushan <007047221b@gmail.com>

[ Upstream commit 6b04456e248761cf68f562f2fd7c04e591fcac94 ]

ifcvf_mgmt_dev leaks memory if it is not freed before
returning. Call is made to correct return statement
so memory does not leak. ifcvf_init_hw does not take
care of this so it is needed to do it here.

Signed-off-by: Tanmay Bhushan <007047221b@gmail.com>
Message-Id: <772e9fe133f21fa78fb98a2ebe8969efbbd58e3c.camel@gmail.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Zhu Lingshan <lingshan.zhu@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/vdpa/ifcvf/ifcvf_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c
index f9c0044c6442e..44b29289aa193 100644
--- a/drivers/vdpa/ifcvf/ifcvf_main.c
+++ b/drivers/vdpa/ifcvf/ifcvf_main.c
@@ -849,7 +849,7 @@ static int ifcvf_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	ret = ifcvf_init_hw(vf, pdev);
 	if (ret) {
 		IFCVF_ERR(pdev, "Failed to init IFCVF hw\n");
-		return ret;
+		goto err;
 	}
 
 	for (i = 0; i < vf->nr_vring; i++)
-- 
2.39.0


  parent reply	other threads:[~2023-02-09 11:17 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-09 11:14 [PATCH AUTOSEL 6.1 01/38] ASoC: amd: yc: Add DMI support for new acer/emdoor platforms Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 02/38] ASoC: SOF: sof-audio: start with the right widget type Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 03/38] ALSA: usb-audio: Add FIXED_RATE quirk for JBL Quantum610 Wireless Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 04/38] ASoC: Intel: sof_rt5682: always set dpcm_capture for amplifiers Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 05/38] ASoC: Intel: sof_cs42l42: " Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 06/38] ASoC: Intel: sof_nau8825: " Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 07/38] ASoC: Intel: sof_ssp_amp: " Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 08/38] selftests/bpf: Verify copy_register_state() preserves parent/live fields Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 09/38] ALSA: hda: Do not unset preset when cleaning up codec Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 10/38] ASoC: amd: yc: Add Xiaomi Redmi Book Pro 15 2022 into DMI table Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 11/38] bpf, sockmap: Don't let sock_map_{close,destroy,unhash} call itself Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 12/38] ASoC: cs42l56: fix DT probe Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 13/38] tools/virtio: fix the vringh test for virtio ring changes Sasha Levin
2023-02-09 11:14 ` Sasha Levin [this message]
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 15/38] net/rose: Fix to not accept on connected socket Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 16/38] selftest: net: Improve IPV6_TCLASS/IPV6_HOPLIMIT tests apparmor compatibility Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 17/38] powerpc/85xx: Fix unannotated intra-function call warning Sasha Levin
2023-02-10 11:25   ` Sathvika Vasireddy
2023-02-14  0:06     ` Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 18/38] powerpc/kvm: " Sasha Levin
2023-02-10 11:26   ` Sathvika Vasireddy
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 19/38] net: stmmac: do not stop RX_CLK in Rx LPI state for qcs404 SoC Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 20/38] powerpc/64: Fix perf profiling asynchronous interrupt handlers Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 21/38] fscache: Use clear_and_wake_up_bit() in fscache_create_volume_work() Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 22/38] drm/nouveau/devinit/tu102-: wait for GFW_BOOT_PROGRESS == COMPLETED Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 23/38] net: ethernet: mtk_eth_soc: Avoid truncating allocation Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 24/38] net: sched: sch: Bounds check priority Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 25/38] s390/decompressor: specify __decompress() buf len to avoid overflow Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 26/38] nvme-fc: fix a missing queue put in nvmet_fc_ls_create_association Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 27/38] nvme: clear the request_queue pointers on failure in nvme_alloc_admin_tag_set Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 28/38] nvme: clear the request_queue pointers on failure in nvme_alloc_io_tag_set Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 29/38] drm/amd/display: Add missing brackets in calculation Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 30/38] drm/amd/display: Adjust downscaling limits for dcn314 Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 31/38] drm/amd/display: Unassign does_plane_fit_in_mall function from dcn3.2 Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 32/38] drm/amd/display: Reset DMUB mailbox SW state after HW reset Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 33/38] drm/amdgpu: enable HDP SD for gfx 11.0.3 Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 34/38] drm/amdgpu: Enable vclk dclk node for gc11.0.3 Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 35/38] drm/amd/display: Properly handle additional cases where DCN is not supported Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 36/38] platform/x86: touchscreen_dmi: Add Chuwi Vi8 (CWI501) DMI match Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 37/38] ceph: move mount state enum to super.h Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 38/38] ceph: blocklist the kclient when receiving corrupted snap trace Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230209111459.1891941-14-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=007047221b@gmail.com \
    --cc=gautam.dawar@xilinx.com \
    --cc=jasowang@redhat.com \
    --cc=jiaming@nfschina.com \
    --cc=lingshan.zhu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=trix@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).