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 serial_pci_init() and multi_serial_pci_init().
Signed-off-by: zhanghailiang <zhang.zhanghaili...@huawei.com> --- hw/char/serial-pci.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c index f05c9b4..2b0bf54 100644 --- a/hw/char/serial-pci.c +++ b/hw/char/serial-pci.c @@ -27,7 +27,6 @@ #include "hw/char/serial.h" #include "hw/pci/pci.h" -#include "qapi/qmp/qerror.h" #define PCI_SERIAL_MAX_PORTS 4 @@ -57,8 +56,7 @@ static int serial_pci_init(PCIDevice *dev) s->baudbase = 115200; serial_realize_core(s, &err); if (err != NULL) { - qerror_report_err(err); - error_free(err); + error_report_err(err); return -1; } @@ -116,8 +114,7 @@ static int multi_serial_pci_init(PCIDevice *dev) s->baudbase = 115200; serial_realize_core(s, &err); if (err != NULL) { - qerror_report_err(err); - error_free(err); + error_report_err(err); return -1; } s->irq = pci->irqs[i]; -- 1.7.12.4