mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
handle case where driver is called too early, before everything is setup
This commit is contained in:
parent
c309336897
commit
9d3da626f2
1 changed files with 4 additions and 2 deletions
|
|
@ -2126,8 +2126,10 @@ impl CorigineUsb {
|
|||
num_trb = len / MAX_TRB_XFER_LEN + if len % MAX_TRB_XFER_LEN != 0 { 1 } else { 0 };
|
||||
}
|
||||
let udc_ep = &mut self.udc_ep[pei];
|
||||
let mut enq_pt =
|
||||
unsafe { udc_ep.enq_pt.load(Ordering::SeqCst).as_mut().expect("couldn't deref pointer") };
|
||||
let mut enq_pt = match unsafe { udc_ep.enq_pt.load(Ordering::SeqCst).as_mut() } {
|
||||
Some(ptr) => ptr,
|
||||
_ => return,
|
||||
};
|
||||
let mut pcs = udc_ep.pcs;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue