xhcid: panic if BAR is 0

This commit is contained in:
Jeremy Soller
2022-02-11 10:42:05 -07:00
parent b9d6ca7db5
commit 33ef3a3262
+4 -1
View File
@@ -101,7 +101,10 @@ fn main() {
name.push_str("_xhci");
let bar_ptr = match bar {
pcid_interface::PciBar::Memory(ptr) => ptr,
pcid_interface::PciBar::Memory(ptr) => match ptr {
0 => panic!("BAR is mapped to address 0"),
_ => ptr,
},
other => panic!("Expected memory bar, found {}", other),
};