Re: [Qemu-devel] [PATCH] pci: Fix unreasonable return value check

2017-06-01 Thread Marcel Apfelbaum
On 01/06/2017 5:51, Mao Zhongyi wrote: Hi, Markus On 05/31/2017 07:07 PM, Markus Armbruster wrote: This is cleanup, not a bug fix, so: pci: Clean up error checking in pci_add_capability() Mao Zhongyi writes: The return value of pci_add_capability2() is

Re: [Qemu-devel] [PATCH] pci: Fix unreasonable return value check

2017-05-31 Thread Mao Zhongyi
Hi, Markus On 05/31/2017 07:07 PM, Markus Armbruster wrote: This is cleanup, not a bug fix, so: pci: Clean up error checking in pci_add_capability() Mao Zhongyi writes: The return value of pci_add_capability2() is only 2 cases, positive on success, nagetive

Re: [Qemu-devel] [PATCH] pci: Fix unreasonable return value check

2017-05-31 Thread Markus Armbruster
This is cleanup, not a bug fix, so: pci: Clean up error checking in pci_add_capability() Mao Zhongyi writes: > The return value of pci_add_capability2() is only 2 cases, positive > on success, nagetive on failure and set error message to Error. In negative >

[Qemu-devel] [PATCH] pci: Fix unreasonable return value check

2017-05-31 Thread Mao Zhongyi
The return value of pci_add_capability2() is only 2 cases, positive on success, nagetive on failure and set error message to Error. In other worlds, If Error is filled, the return value must be nagetive. There is no case where errp is set but the return value is a positive. But