From 0816c8292f9f60072bd61c59ad3350f5f64395f9 Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Mon, 29 Apr 2024 03:45:51 +0000 Subject: [PATCH] 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 --- pci/src/configuration.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pci/src/configuration.rs b/pci/src/configuration.rs index 89d831bbb..a12fb75e3 100644 --- a/pci/src/configuration.rs +++ b/pci/src/configuration.rs @@ -757,10 +757,6 @@ impl PciConfiguration { 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 { return Err(Error::BarInUse64(bar_idx)); }