Skip to content
Permalink
Browse files

IOS/VEN: Return -4 when no transfer was cancelled

Simple accuracy fix.
  • Loading branch information...
leoetlino committed May 2, 2019
1 parent 4c6ef81 commit d7e23d71f8621faa3b051efff9dd46671b2d4eb2
Showing with 3 additions and 1 deletion.
  1. +3 −1 Source/Core/Core/IOS/USB/USB_VEN/VEN.cpp
@@ -105,7 +105,9 @@ s32 USB_VEN::SubmitTransfer(USB::Device& device, const IOCtlVRequest& ioctlv)
IPCCommandResult USB_VEN::CancelEndpoint(USBV5Device& device, const IOCtlRequest& request)
{
const u8 endpoint = static_cast<u8>(Memory::Read_U32(request.buffer_in + 8));
GetDeviceById(device.host_id)->CancelTransfer(endpoint);
// IPC_EINVAL (-4) is returned when no transfer was cancelled.
if (GetDeviceById(device.host_id)->CancelTransfer(endpoint) < 0)
return GetDefaultReply(IPC_EINVAL);
return GetDefaultReply(IPC_SUCCESS);
}

0 comments on commit d7e23d7

Please sign in to comment.
You can’t perform that action at this time.