mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:57:34 +00:00
Kernel/USB: Use TRY() in the various USB classes
This commit is contained in:
parent
f8fba5f017
commit
29a9f80ecf
5 changed files with 39 additions and 117 deletions
|
@ -69,12 +69,7 @@ KResultOr<size_t> Pipe::control_transfer(u8 request_type, u8 request, u16 value,
|
|||
transfer->set_setup_packet(usb_request);
|
||||
|
||||
dbgln_if(USB_DEBUG, "Pipe: Transfer allocated @ {}", transfer->buffer_physical());
|
||||
auto transfer_len_or_error = m_controller->submit_control_transfer(*transfer);
|
||||
|
||||
if (transfer_len_or_error.is_error())
|
||||
return transfer_len_or_error.error();
|
||||
|
||||
auto transfer_length = transfer_len_or_error.release_value();
|
||||
auto transfer_length = TRY(m_controller->submit_control_transfer(*transfer));
|
||||
|
||||
// TODO: Check transfer for completion and copy data from transfer buffer into data
|
||||
if (length > 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue