mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-01 22:23:23 -10:00
intel_iommu: a fix to vtd_find_as_from_bus_num()
Ensure the return value of vtd_find_as_from_bus_num() is NULL by enforcing vtd_bus=NULL. This would help caller of vtd_find_as_from_bus_num() to decide if any further operation on the returned vtd_bus. Cc: [email protected] Cc: Kevin Tian <[email protected]> Cc: Jacob Pan <[email protected]> Cc: Peter Xu <[email protected]> Cc: Yi Sun <[email protected]> Signed-off-by: Liu Yi L <[email protected]> Signed-off-by: Yi Sun <[email protected]> Message-Id: <[email protected]> Reviewed-by: Peter Xu <[email protected]> Reviewed-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
This commit is contained in:
1 parent
d945d9f173
commit
a2e1cd41cc
1 file changed
+1
@@ -948,6 +948,7 @@ static VTDBus *vtd_find_as_from_bus_num(IntelIOMMUState *s, uint8_t bus_num)
|
||||
return vtd_bus;
|
||||
}
|
||||
}
|
||||
vtd_bus = NULL;
|
||||
}
|
||||
return vtd_bus;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user