ams: use R_SUCCEED, R_THROW globally

This commit is contained in:
Michael Scire
2022-03-26 00:14:36 -07:00
parent e5b1739f65
commit dd78ede99f
370 changed files with 2107 additions and 2107 deletions

View File

@@ -93,7 +93,7 @@ namespace ams::gpio::driver::impl {
Result RegisterDeviceCode(DeviceCode device_code, Pad *pad) {
AMS_ASSERT(pad != nullptr);
R_TRY(GetDeviceCodeEntryManager().Add(device_code, pad));
return ResultSuccess();
R_SUCCEED();
}
bool UnregisterDeviceCode(DeviceCode device_code) {
@@ -120,7 +120,7 @@ namespace ams::gpio::driver::impl {
/* Set output. */
*out = device->SafeCastToPointer<Pad>();
return ResultSuccess();
R_SUCCEED();
}
Result FindPadByNumber(Pad **out, int pad_number) {
@@ -145,7 +145,7 @@ namespace ams::gpio::driver::impl {
/* Check that we found the pad. */
R_UNLESS(found, ddsf::ResultDeviceCodeNotFound());
return ResultSuccess();
R_SUCCEED();
}
}

View File

@@ -32,7 +32,7 @@ namespace ams::gpio::driver::impl {
/* We opened successfully. */
pad_guard.Cancel();
return ResultSuccess();
R_SUCCEED();
}
void PadSessionImpl::Close() {
@@ -82,7 +82,7 @@ namespace ams::gpio::driver::impl {
/* We succeeded. */
hl_guard.Cancel();
ev_guard.Cancel();
return ResultSuccess();
R_SUCCEED();
}
void PadSessionImpl::UnbindInterrupt() {
@@ -115,7 +115,7 @@ namespace ams::gpio::driver::impl {
Result PadSessionImpl::GetInterruptEnabled(bool *out) const {
*out = this->GetDevice().SafeCastTo<Pad>().IsInterruptEnabled();
return ResultSuccess();
R_SUCCEED();
}
Result PadSessionImpl::SetInterruptEnabled(bool en) {
@@ -133,7 +133,7 @@ namespace ams::gpio::driver::impl {
R_TRY(this->UpdateDriverInterruptEnabled());
pad_guard.Cancel();
return ResultSuccess();
R_SUCCEED();
}
void PadSessionImpl::SignalInterruptBoundEvent() {