Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hw/i386/intel_iommu: Simplify vtd_find_as_from_bus_num() logic
The vtd_find_as_from_bus_num() function was introduced (in commit dbaabb2) in a code format that could return an incorrect pointer, which was later fixed by commit a2e1cd4. 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>
- Loading branch information