]> git.baikalelectronics.ru Git - kernel.git/commit
vfio: platform: fix reference leak in vfio_platform_open
authorZhang Qilong <zhangqilong3@huawei.com>
Sat, 31 Oct 2020 03:03:53 +0000 (11:03 +0800)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 3 Nov 2020 18:07:40 +0000 (11:07 -0700)
commitbcffb1413a8f1c7bcd84e07ef20e8303d774dd38
tree70641145617ec44524867375c5642f4c140c323e
parent42da33efd8c121e1f67d83c51bc7da83a985bd8d
vfio: platform: fix reference leak in vfio_platform_open

pm_runtime_get_sync() will increment pm usage counter even it
failed. Forgetting to call pm_runtime_put will result in
reference leak in vfio_platform_open, so we should fix it.

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Acked-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/platform/vfio_platform_common.c