We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 056ec31 commit 42c816eCopy full SHA for 42c816e
framework_lib/src/chromium_ec/portio.rs
@@ -100,7 +100,10 @@ fn init() -> bool {
100
}
101
102
// First try on MEC
103
- portio_mec::init();
+ if !portio_mec::init() {
104
+ *init = Initialized::Failed;
105
+ return false;
106
+ }
107
let ec_id = portio_mec::transfer_read(MEC_MEMMAP_OFFSET + EC_MEMMAP_ID, 2);
108
if ec_id[0] == b'E' && ec_id[1] == b'C' {
109
*init = Initialized::SucceededMec;
@@ -113,6 +116,7 @@ fn init() -> bool {
113
116
let res = ioperm(EC_LPC_ADDR_HOST_ARGS as u64, 8 + 0xFF, 1);
114
117
if res != 0 {
115
118
error!("ioperm failed. portio driver is likely block by Linux kernel lockdown mode");
119
120
return false;
121
122
0 commit comments