ams: globally prefer R_RETURN to return for ams::Result

This commit is contained in:
Michael Scire
2022-03-26 14:48:33 -07:00
parent dd78ede99f
commit bbf22b4c60
325 changed files with 1955 additions and 1993 deletions

View File

@@ -148,7 +148,7 @@ namespace ams::i2c::driver::impl {
os::SleepThread(m_retry_interval);
continue;
}
return i2c::ResultBusBusy();
R_THROW(i2c::ResultBusBusy());
}
} R_END_TRY_CATCH;
@@ -160,14 +160,14 @@ namespace ams::i2c::driver::impl {
/* Acquire exclusive access to the device. */
std::scoped_lock lk(this->GetDevice().SafeCastTo<I2cDeviceProperty>().GetDriver().SafeCastTo<II2cDriver>().GetTransactionOrderMutex());
return this->ExecuteTransactionWithRetry(nullptr, Command::Send, src, src_size, option);
R_RETURN(this->ExecuteTransactionWithRetry(nullptr, Command::Send, src, src_size, option));
}
Result I2cSessionImpl::Receive(void *dst, size_t dst_size, TransactionOption option) {
/* Acquire exclusive access to the device. */
std::scoped_lock lk(this->GetDevice().SafeCastTo<I2cDeviceProperty>().GetDriver().SafeCastTo<II2cDriver>().GetTransactionOrderMutex());
return this->ExecuteTransactionWithRetry(dst, Command::Receive, nullptr, dst_size, option);
R_RETURN(this->ExecuteTransactionWithRetry(dst, Command::Receive, nullptr, dst_size, option));
}
Result I2cSessionImpl::ExecuteCommandList(void *dst, size_t dst_size, const void *src, size_t src_size) {