summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorb14ckcat <b14ckcat@protonmail.com>2022-06-28 21:43:10 -0400
committerLinus Groh <mail@linusgroh.de>2022-06-29 13:38:13 +0100
commit13445f5a4340b46ee226bf90e28319b5b3c289ce (patch)
treeee2bcd3a1766ebe5df4dd825ccc3e01f1dd5700a
parent104330d1a006829206ce9201084efc7dba346eaf (diff)
downloadserenity-13445f5a4340b46ee226bf90e28319b5b3c289ce.zip
Kernel/USB: Use proper error codes for UHCI transfers
-rw-r--r--Kernel/Bus/USB/UHCI/UHCIController.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Bus/USB/UHCI/UHCIController.cpp b/Kernel/Bus/USB/UHCI/UHCIController.cpp
index 8ea28e06e8..9f3db0a28a 100644
--- a/Kernel/Bus/USB/UHCI/UHCIController.cpp
+++ b/Kernel/Bus/USB/UHCI/UHCIController.cpp
@@ -411,7 +411,7 @@ ErrorOr<size_t> UHCIController::submit_control_transfer(Transfer& transfer)
QueueHead* transfer_queue = allocate_queue_head();
if (!transfer_queue) {
free_descriptor_chain(data_descriptor_chain);
- return 0;
+ return ENOMEM;
}
transfer_queue->attach_transfer_descriptor_chain(setup_td);
@@ -453,7 +453,7 @@ ErrorOr<size_t> UHCIController::submit_bulk_transfer(Transfer& transfer)
QueueHead* transfer_queue = allocate_queue_head();
if (!transfer_queue) {
free_descriptor_chain(data_descriptor_chain);
- return 0;
+ return ENOMEM;
}
transfer_queue->attach_transfer_descriptor_chain(data_descriptor_chain);