diff options
| author | Léo Lam <leo@innovatetechnologi.es> | 2019-05-02 17:37:43 +0200 |
|---|---|---|
| committer | Léo Lam <leo@innovatetechnologi.es> | 2019-05-21 19:07:30 +0200 |
| commit | d7e23d71f8621faa3b051efff9dd46671b2d4eb2 (patch) | |
| tree | 9608cc186cc9410fba158f9f8741fdad8222e40c /Source/Core | |
| parent | 4c6ef812913943673ab61295cf9e9c139d9ae366 (diff) | |
IOS/VEN: Return -4 when no transfer was cancelled
Simple accuracy fix.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/IOS/USB/USB_VEN/VEN.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/Core/Core/IOS/USB/USB_VEN/VEN.cpp b/Source/Core/Core/IOS/USB/USB_VEN/VEN.cpp index 4bb28968e3..e969417839 100644 --- a/Source/Core/Core/IOS/USB/USB_VEN/VEN.cpp +++ b/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); } |
