pci: drop a useless check

The end_addr is a 64-bit value which cannot possibly be larger than
u64::max_value().

Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu 2024-04-29 03:45:51 +00:00 committed by Rob Bradford
parent 319538fbed
commit 0816c8292f

View File

@ -757,10 +757,6 @@ impl PciConfiguration {
return Err(Error::BarInvalid64(bar_idx)); return Err(Error::BarInvalid64(bar_idx));
} }
if end_addr > u64::max_value() {
return Err(Error::BarAddressInvalid(config.addr, config.size));
}
if self.bars[bar_idx + 1].used { if self.bars[bar_idx + 1].used {
return Err(Error::BarInUse64(bar_idx)); return Err(Error::BarInUse64(bar_idx));
} }