diff --git a/drivers/usb/xhcid/src/xhci/scheme.rs b/drivers/usb/xhcid/src/xhci/scheme.rs index ed2a970cde..b11983db79 100644 --- a/drivers/usb/xhcid/src/xhci/scheme.rs +++ b/drivers/usb/xhcid/src/xhci/scheme.rs @@ -1846,8 +1846,7 @@ impl Xhci { pub async fn get_desc(&self, port_id: PortId, slot: u8) -> Result { let ports = self.ports.lock().unwrap_or_else(|e| e.into_inner()); let idx = port_id.root_hub_port_index().ok_or(Error::new(EINVAL))?; - let port = ports.get(idx).ok_or(Error::new(EINVAL))?; - .ok_or(Error::new(ENOENT))?; + let port = ports.get(idx).ok_or(Error::new(ENOENT))?; if !port.flags().contains(port::PortFlags::CCS) { return Err(Error::new(ENOENT)); }