vfio/platform: fix module_put call in error flow
authorMax Gurtovoy <mgurtovoy@nvidia.com>
Tue, 18 May 2021 19:21:31 +0000 (22:21 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Jun 2021 11:39:15 +0000 (13:39 +0200)
commit46ae882bb19a12e8df9936e8dcf1924b6abb2b56
treeb9a8bb32195d4ba70a0117936e522ccc3213da49
parent2adb0313b132cdade0827820f1d0db4833dfb4ef
vfio/platform: fix module_put call in error flow

[ Upstream commit dc51ff91cf2d1e9a2d941da483602f71d4a51472 ]

The ->parent_module is the one that use in try_module_get. It should
also be the one the we use in module_put during vfio_platform_open().

Fixes: 32a2d71c4e80 ("vfio: platform: introduce vfio-platform-base module")
Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Message-Id: <20210518192133.59195-1-mgurtovoy@nvidia.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/vfio/platform/vfio_platform_common.c