xhcid: panic if BAR is 0
This commit is contained in:
+4
-1
@@ -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),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user