mirror of
https://github.com/mii443/qemu.git
synced 2025-12-12 05:18:37 +00:00
The vtd_find_as_from_bus_num() function was introduced (in commitdbaabb25f) in a code format that could return an incorrect pointer, which was later fixed by commita2e1cd41cc. We could have avoided this by writing the if() statement differently. Do it now, in case this function is re-used. The code is easier to review (harder to miss bugs). Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200305102702.31512-1-philmd@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>