diff options
| author | Max Gurtovoy <[email protected]> | 2021-05-18 22:21:31 +0300 |
|---|---|---|
| committer | Alex Williamson <[email protected]> | 2021-05-24 13:40:13 -0600 |
| commit | dc51ff91cf2d1e9a2d941da483602f71d4a51472 (patch) | |
| tree | 2f8dc7a40187aec11d15447f314426d1b69159ad | |
| parent | 752774ce7793a1f8baa55aae31f3b4caac49cbe4 (diff) | |
vfio/platform: fix module_put call in error flow
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 <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
| -rw-r--r-- | drivers/vfio/platform/vfio_platform_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vfio/platform/vfio_platform_common.c b/drivers/vfio/platform/vfio_platform_common.c index 361e5b57e369..470fcf7dac56 100644 --- a/drivers/vfio/platform/vfio_platform_common.c +++ b/drivers/vfio/platform/vfio_platform_common.c @@ -291,7 +291,7 @@ err_irq: vfio_platform_regions_cleanup(vdev); err_reg: mutex_unlock(&driver_lock); - module_put(THIS_MODULE); + module_put(vdev->parent_module); return ret; } |