mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-03 08:08:39 -04:00
ams: globally prefer R_RETURN to return for ams::Result
This commit is contained in:
parent
dd78ede99f
commit
bbf22b4c60
325 changed files with 1955 additions and 1993 deletions
|
@ -192,7 +192,7 @@ namespace ams::i2c::driver::board::nintendo::nx::impl {
|
|||
}
|
||||
|
||||
/* Send the data. */
|
||||
return this->Send(static_cast<const u8 *>(src), src_size, option, device->GetAddress(), device->GetAddressingMode());
|
||||
R_RETURN(this->Send(static_cast<const u8 *>(src), src_size, option, device->GetAddress(), device->GetAddressingMode()));
|
||||
}
|
||||
|
||||
Result I2cBusAccessor::Receive(void *dst, size_t dst_size, I2cDeviceProperty *device, TransactionOption option) {
|
||||
|
@ -208,7 +208,7 @@ namespace ams::i2c::driver::board::nintendo::nx::impl {
|
|||
}
|
||||
|
||||
/* Send the data. */
|
||||
return this->Receive(static_cast<u8 *>(dst), dst_size, option, device->GetAddress(), device->GetAddressingMode());
|
||||
R_RETURN(this->Receive(static_cast<u8 *>(dst), dst_size, option, device->GetAddress(), device->GetAddressingMode()));
|
||||
}
|
||||
|
||||
void I2cBusAccessor::SuspendBus() {
|
||||
|
@ -399,7 +399,7 @@ namespace ams::i2c::driver::board::nintendo::nx::impl {
|
|||
|
||||
this->DisableInterruptMask();
|
||||
os::ClearInterruptEvent(std::addressof(m_interrupt_event));
|
||||
return i2c::ResultTimeout();
|
||||
R_THROW(i2c::ResultTimeout());
|
||||
}
|
||||
|
||||
/* Check and handle any errors. */
|
||||
|
@ -429,7 +429,7 @@ namespace ams::i2c::driver::board::nintendo::nx::impl {
|
|||
|
||||
this->DisableInterruptMask();
|
||||
os::ClearInterruptEvent(std::addressof(m_interrupt_event));
|
||||
return i2c::ResultTimeout();
|
||||
R_THROW(i2c::ResultTimeout());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -474,7 +474,7 @@ namespace ams::i2c::driver::board::nintendo::nx::impl {
|
|||
|
||||
this->DisableInterruptMask();
|
||||
os::ClearInterruptEvent(std::addressof(m_interrupt_event));
|
||||
return i2c::ResultTimeout();
|
||||
R_THROW(i2c::ResultTimeout());
|
||||
}
|
||||
|
||||
/* Check and handle any errors. */
|
||||
|
|
|
@ -101,13 +101,13 @@ namespace ams::i2c::driver::board::nintendo::nx::impl {
|
|||
Result CheckAndHandleError() {
|
||||
const Result result = this->GetTransactionResult();
|
||||
this->HandleTransactionError(result);
|
||||
|
||||
if (R_FAILED(result)) {
|
||||
this->DisableInterruptMask();
|
||||
os::ClearInterruptEvent(std::addressof(m_interrupt_event));
|
||||
return result;
|
||||
}
|
||||
|
||||
R_SUCCEED();
|
||||
R_RETURN(result);
|
||||
}
|
||||
public:
|
||||
virtual void InitializeDriver() override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue