zhanghailiang <zhang.zhanghaili...@huawei.com> writes:

> qerror_report_err() is a transitional interface to help with
> converting existing monitor commands to QMP.  It should not be used
> elsewhere.  Replace by error_report_err() in assigned_initfn().
>
> Signed-off-by: zhanghailiang <zhang.zhanghaili...@huawei.com>
> ---
>  hw/i386/kvm/pci-assign.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c
> index bd92c69..f2f4e07 100644
> --- a/hw/i386/kvm/pci-assign.c
> +++ b/hw/i386/kvm/pci-assign.c
> @@ -1831,8 +1831,7 @@ out:
>  
>  exit_with_error:
>      assert(local_err);
> -    qerror_report_err(local_err);
> -    error_free(local_err);
> +    error_report_err(local_err);
>      return -1;
>  }

This breaks the error reply when you hot plug the devices via QMP
device_add.

A correct solution is my "[PATCH 10/10] pci-assign: Convert to realize".

Reply via email to