]> git.itanic.dy.fi Git - linux-stable/commit
vdpa: ifcvf: Do proper cleanup if IFCVF init fails
authorTanmay Bhushan <007047221b@gmail.com>
Tue, 27 Dec 2022 21:02:16 +0000 (22:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Feb 2023 11:59:42 +0000 (12:59 +0100)
commit5d2cc32c1c10bd889125d2adc16a6bc3338dcd3e
tree79037b0ed85e423b1ad721e2e7d76ea54d878a45
parent2ad95cb1af7ada2a7a3a558352cbb7a7ab160e43
vdpa: ifcvf: Do proper cleanup if IFCVF init fails

[ 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