IOS/VEN: Return -4 when no transfer was cancelled
Simple accuracy fix.
This commit is contained in:
parent
4c6ef81291
commit
d7e23d71f8
|
@ -105,7 +105,9 @@ s32 USB_VEN::SubmitTransfer(USB::Device& device, const IOCtlVRequest& ioctlv)
|
||||||
IPCCommandResult USB_VEN::CancelEndpoint(USBV5Device& device, const IOCtlRequest& request)
|
IPCCommandResult USB_VEN::CancelEndpoint(USBV5Device& device, const IOCtlRequest& request)
|
||||||
{
|
{
|
||||||
const u8 endpoint = static_cast<u8>(Memory::Read_U32(request.buffer_in + 8));
|
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);
|
return GetDefaultReply(IPC_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue