vfio/mdev: Avoid release parent reference during error path
During mdev parent registration in mdev_register_device(), if parent device is duplicate, it releases the reference of existing parent device. This is incorrect. Existing parent device should not be touched. Fixes: 7b96953b ("vfio: Mediated device Core driver") Reviewed-by: NCornelia Huck <cohuck@redhat.com> Reviewed-by: NKirti Wankhede <kwankhede@nvidia.com> Reviewed-by: NMaxim Levitsky <mlevitsk@redhat.com> Signed-off-by: NParav Pandit <parav@mellanox.com> Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
Showing
想要评论请 注册 或 登录